Package org.drools.workflow.core.impl

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


                readEndDataInputAssociation(xmlNode, endNode);
            } else if ("signalEventDefinition".equals(nodeName)) {
                String signalName = ((Element) xmlNode).getAttribute("signalRef");
                String variable = (String) endNode.getMetaData("MappingVariable");
                List<DroolsAction> actions = new ArrayList<DroolsAction>();
                actions.add(new DroolsConsequenceAction("mvel",
                    "kcontext.getKnowledgeRuntime().signalEvent(\""
                        + signalName + "\", " + (variable == null ? "null" : variable) + ")"));
                endNode.setActions(EndNode.EVENT_NODE_ENTER, actions);
            }
            xmlNode = xmlNode.getNextSibling();
View Full Code Here


                }
                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

            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

      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

        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

    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

        getNode().setName(name);
        return this;
    }

    public ActionNodeFactory action(String dialect, String action) {
        getActionNode().setAction(new DroolsConsequenceAction(dialect, action));
        return this;
    }
View Full Code Here

   
    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

        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

        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

TOP

Related Classes of org.drools.workflow.core.impl.DroolsConsequenceAction

Copyright © 2018 www.massapicom. 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.