Examples of DroolsConsequenceAction


Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

                }
                String variable = (String) endNode.getMetaData("MappingVariable");
                endNode.setMetaData("MessageType", message.getType());
                List<DroolsAction> actions = new ArrayList<DroolsAction>();
               
                actions.add(new DroolsConsequenceAction("java",
                    "org.drools.process.instance.impl.WorkItemImpl workItem = new org.drools.process.instance.impl.WorkItemImpl();" + EOL +
                    "workItem.setName(\"Send Task\");" + EOL +
                    "workItem.setParameter(\"MessageType\", \"" + message.getType() + "\");" + EOL +
                    (variable == null ? "" : "workItem.setParameter(\"Message\", " + variable + ");" + EOL) +
                    "((org.drools.process.instance.WorkItemManager) kcontext.getKnowledgeRuntime().getWorkItemManager()).internalExecuteWorkItem(workItem);"));
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

            if ("compensateEventDefinition".equals(nodeName)) {
                String activityRef = ((Element) xmlNode).getAttribute("activityRef");
                if (activityRef != null && activityRef.trim().length() > 0) {
                  actionNode.setMetaData("Compensate", activityRef);
                  List<DroolsAction> actions = new ArrayList<DroolsAction>();
                    actions.add(new DroolsConsequenceAction("java",
                  "kcontext.getProcessInstance().signalEvent(\"Compensate-" + activityRef + "\", null);"));
                    actionNode.setActions(EndNode.EVENT_NODE_ENTER, actions);
                }
//                boolean waitForCompletion = true;
//                String waitForCompletionString = ((Element) xmlNode).getAttribute("waitForCompletion");
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

   
    public RuleSetNodeFactory timer(String delay, String period, String dialect, String action) {
      Timer timer = new Timer();
      timer.setDelay(delay);
      timer.setPeriod(period);
      getRuleSetNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
      return this;
    }
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

        return this;
    }

    public HumanTaskNodeFactory onEntryAction(String dialect, String action) {
        if (getHumanTaskNode().getActions(dialect) != null) {
          getHumanTaskNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getHumanTaskNode().setActions(MilestoneNode.EVENT_NODE_ENTER, actions);
        }
        return this;
    }
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

        return this;
    }

    public HumanTaskNodeFactory onExitAction(String dialect, String action) {
        if (getHumanTaskNode().getActions(dialect) != null) {
          getHumanTaskNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getHumanTaskNode().setActions(MilestoneNode.EVENT_NODE_EXIT, actions);
        }
        return this;
    }
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

    public HumanTaskNodeFactory timer(String delay, String period, String dialect, String action) {
      Timer timer = new Timer();
      timer.setDelay(delay);
      timer.setPeriod(period);
      getHumanTaskNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
      return this;
    }
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

      return this;
    }

    public WorkItemNodeFactory onEntryAction(String dialect, String action) {
        if (getWorkItemNode().getActions(dialect) != null) {
          getWorkItemNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getWorkItemNode().setActions(MilestoneNode.EVENT_NODE_ENTER, actions);
        }
        return this;
    }
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

        return this;
    }

    public WorkItemNodeFactory onExitAction(String dialect, String action) {
        if (getWorkItemNode().getActions(dialect) != null) {
          getWorkItemNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
        } else {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            actions.add(new DroolsConsequenceAction(dialect, action));
            getWorkItemNode().setActions(MilestoneNode.EVENT_NODE_EXIT, actions);
        }
        return this;
    }
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

    public WorkItemNodeFactory timer(String delay, String period, String dialect, String action) {
      Timer timer = new Timer();
      timer.setDelay(delay);
      timer.setPeriod(period);
      getWorkItemNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
      return this;
    }
View Full Code Here

Examples of org.jbpm.workflow.core.impl.DroolsConsequenceAction

                if (actionNode.getAction() == null) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "Action node '" + node.getName() + "' [" + node.getId() + "] has no action."));
                } else {
                    if (actionNode.getAction() instanceof DroolsConsequenceAction) {
                        DroolsConsequenceAction droolsAction = (DroolsConsequenceAction) actionNode.getAction();
                        String actionString = droolsAction.getConsequence();
                        if (actionString == null) {
                            errors.add(new ProcessValidationErrorImpl(process,
                                "Action node '" + node.getName() + "' [" + node.getId() + "] has empty action."));
                        } else if( "mvel".equals( droolsAction.getDialect() ) ) {
                            try {
                                ExpressionCompiler compiler = new ExpressionCompiler(actionString);
                                compiler.setVerifying(true);
                                ParserContext parserContext = new ParserContext();
                                //parserContext.setStrictTypeEnforcement(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.