Package org.jbpm.workflow.core

Examples of org.jbpm.workflow.core.DroolsAction


        context.init( pkgBuilder, pkg, null, dialectRegistry, mvelDialect, null);
       
        pkgBuilder.addPackageFromDrl( new StringReader("package pkg1;\nglobal java.util.List list;\n") );       
       
        ActionNode actionNode = new ActionNode();
        DroolsAction action = new DroolsConsequenceAction("mvel", null);
        actionNode.setAction(action);
       
        final MVELActionBuilder builder = new MVELActionBuilder();
        builder.build( context,
                       action,
View Full Code Here


        context.init( pkgBuilder, pkg, null, dialectRegistry, javaDialect, null);
       
        pkgBuilder.addPackageFromDrl( new StringReader("package pkg1;\nglobal java.util.List list;\n") );       
       
        ActionNode actionNode = new ActionNode();
        DroolsAction action = new DroolsConsequenceAction("java", null);
        actionNode.setAction(action);
       
        ProcessDialect dialect = ProcessDialectRegistry.getDialect( "java" );           
        dialect.getActionBuilder().build( context, action, actionDescr, actionNode );
        dialect.addProcess( context );
View Full Code Here

        context.init( pkgBuilder, pkg, null, pkgReg.getDialectCompiletimeRegistry(), mvelDialect, null);
       
        pkgBuilder.addPackageFromDrl( new StringReader("package pkg1;\nglobal java.util.List list;\n") );       
       
        ActionNode actionNode = new ActionNode();
        DroolsAction action = new DroolsConsequenceAction("java", null);
        actionNode.setAction(action);
       
        final MVELActionBuilder builder = new MVELActionBuilder();
        builder.build( context,
                       action,
View Full Code Here

        timer.setDelay("200");
        timer.setPeriod("200");
        action = new DroolsConsequenceAction("dialect", "consequence");
        milestone.addTimer(timer, action);
        List<DroolsAction> actions = new ArrayList<DroolsAction>();
        DroolsAction action1 = new DroolsConsequenceAction("java", "System.out.println(\"action1\");");
        actions.add(action1);
        DroolsAction action2 = new DroolsConsequenceAction("java", "System.out.println(\"action2\");");
        actions.add(action2);
        milestone.setActions(ExtendedNodeImpl.EVENT_NODE_ENTER, actions);
        milestone.setActions(ExtendedNodeImpl.EVENT_NODE_EXIT, actions);
        process.addNode(milestone);
        connection = new ConnectionImpl(join, Node.CONNECTION_DEFAULT_TYPE, milestone, Node.CONNECTION_DEFAULT_TYPE);
View Full Code Here

        endNode.setName("EndNode");
        endNode.setId(2);
        process.addNode(endNode);
        ActionNode actionNode = new ActionNode();
        actionNode.setName("Action");
        DroolsAction action = new DroolsConsequenceAction("java", null);
        action.setMetaData("Action", new Action() {
            public void execute(ProcessContext context) throws Exception {
              System.out.println("Executed action");
              executed = true;
            }
        });
View Full Code Here

        startNode.setId(1);
        process.addNode(startNode);
       
        ActionNode actionNode = new ActionNode();
        actionNode.setName("Print");
        DroolsAction action = new DroolsConsequenceAction("java", null);
        action.setMetaData("Action", new Action() {
      public void execute(ProcessContext context) throws Exception {
              System.out.println("Executed action");
      }
        });
        actionNode.setAction(action);
View Full Code Here

        );
       
        final List<String> myList = new ArrayList<String>();
        ActionNode actionNode = new ActionNode();
        actionNode.setName("Print child");
        DroolsAction action = new DroolsConsequenceAction("java", null);
        action.setMetaData("Action", new Action() {
            public void execute(ProcessContext context) throws Exception {
              System.out.println("Executed action for child " + ((Person) context.getVariable("child")).getName());
                myList.add("Executed action");
            }
        });
View Full Code Here

    if ("action".equals(type)) {
      exceptionHandler = new ActionExceptionHandler();
      org.w3c.dom.Node xmlNode = element.getFirstChild();
          if (xmlNode instanceof Element) {
          Element actionXml = (Element) xmlNode;
          DroolsAction action = ActionNodeHandler.extractAction(actionXml);
          ((ActionExceptionHandler) exceptionHandler).setAction(action);
          }
    } else {
      throw new SAXParseException("Unknown exception handler type " + type, parser.getLocator());
    }
View Full Code Here

        }
        if (period != null && period.length() != 0 ) {
            timer.setPeriod(period);
        }
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        DroolsAction action = null;
        if (xmlNode instanceof Element) {
        Element actionXml = (Element) xmlNode;
        action = AbstractNodeHandler.extractAction(actionXml);
        }
        parent.addTimer(timer, action);
View Full Code Here

          if (nodeName.equals(type)) {
            List<DroolsAction> actions = new ArrayList<DroolsAction>();
            NodeList subNodeList = xmlNode.getChildNodes();
                for (int j = 0; j < subNodeList.getLength(); j++) {
                  Element subXmlNode = (Element) subNodeList.item(j);
                  DroolsAction action = extractAction(subXmlNode);
                  actions.add(action);
                }
              node.setActions(type, actions);
            return;
          }
View Full Code Here

TOP

Related Classes of org.jbpm.workflow.core.DroolsAction

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.