@Override
  public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj) {
    List<AbstractRepositoryAction> actions = super.getActions(viewObj);

    if (!canDelete(viewObj)) {
      actions.remove(removeFromRepositoryAction);
    }
    if (isProcessNode(viewObj)) {
      actions.remove(createFolderAction);
    }

    if (RepositoryResourceUtil.hasContainerItem(
        viewObj, FolderType.SYSTEM_FOLDER_LITERAL, FolderType.FOLDER_LITERAL)) {
      addAction(actions, addAction, viewObj);
    }

    if (viewObj.getProperty().getItem() instanceof MDMServerObjectItem) {
      int index = actions.indexOf(mdmEditPropertyAction);
      if (index != -1) {
        actions.add(index, editViewProcessPropertyAction);
        actions.remove(mdmEditPropertyAction);
      }

      addAction(actions, renameProcessAction, viewObj);
      // deploy
      addAction(actions, deployToAction, viewObj);
      addAction(actions, deployToLastServerAction, viewObj);
      addAction(actions, deployAnotherToAction, viewObj);
      addAction(actions, undeployAction, viewObj);
    }
    addAction(actions, deployAllAction, viewObj);
    return actions;
  }
  @Override
  protected void doRun() {
    selectObj = getSelectedObject().get(0);

    JobOptionsDialog dialog =
        new JobOptionsDialog(
            getShell(), Messages.JobProcesssDialogTiggerTitle_title, Execution.EMBEDDED);
    dialog.setBlockOnOpen(true);
    int ret = dialog.open();
    if (ret == Dialog.CANCEL) {
      return;
    }

    String jobName = ""; // $NON-NLS-1$
    String jobVersion = ""; // $NON-NLS-1$

    if (selectObj instanceof IRepositoryViewObject) {
      jobName = ((IRepositoryViewObject) selectObj).getProperty().getLabel();
      jobVersion = ((IRepositoryViewObject) selectObj).getProperty().getVersion();
    }
    // check exist
    IValidateService validateService =
        (IValidateService) GlobalServiceRegister.getDefault().getService(IValidateService.class);
    if (validateService != null) {
      boolean result =
          validateService.validateAndAlertObjectExistence(
              IServerObjectRepositoryType.TYPE_ROUTINGRULE, getNewTriggerName(jobName), null);
      if (!result) {
        return;
      }
    }
    //
    WSRoutingRuleE routingRule = createTrigger(jobName, jobVersion, dialog);
    // if the new objectect is opened ,than close it before regenerating
    IRepositoryViewObject toDelete =
        RepositoryResourceUtil.findViewObjectByName(
            IServerObjectRepositoryType.TYPE_ROUTINGRULE, PREFIX + jobName);
    if (toDelete != null) {
      IEditorPart openedEditor = UIUtil.findOpenedEditor(toDelete);
      if (openedEditor != null) {
        UIUtil.closeEditor(openedEditor, false);
      }
      // delete directly
      RepositoryResourceUtil.removeViewObjectPhysically(toDelete, jobVersion);
    }
    AttachToTriggerView(jobName, routingRule);
  }
  /**
   * DOC jsxie Comment method "AttachToTriggerView".
   *
   * @param filename
   * @param trigger
   */
  private void AttachToTriggerView(String filename, WSRoutingRuleE trigger) {

    WSRoutingRuleItem item = MdmpropertiesFactory.eINSTANCE.createWSRoutingRuleItem();
    ItemState itemState = PropertiesFactory.eINSTANCE.createItemState();
    item.setState(itemState);
    item.setWsRoutingRule(trigger);
    item.getState().setPath(""); // $NON-NLS-1$
    RepositoryResourceUtil.createItem(item, PREFIX + filename);
    getCommonViewer().refresh();
  }