Examples of DroolsAction


Examples of org.drools.workflow.core.DroolsAction

        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

Examples of org.drools.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

Examples of org.drools.workflow.core.DroolsAction

        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

Examples of org.drools.workflow.core.DroolsAction

        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);
       
        javaDialect.getActionBuilder().build( context, action, actionDescr, actionNode );
        javaDialect.addProcess( context );
        javaDialect.compileAll();           
View Full Code Here

Examples of org.drools.workflow.core.DroolsAction

        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

Examples of org.drools.workflow.core.DroolsAction

                String faultVariable = exceptionHandler.getFaultVariable();
                if (faultVariable != null && faultVariable.length() > 0) {
                  xmlDump.append("faultVariable=\"" + faultVariable + "\" ");
                }
              xmlDump.append(">" + EOL);
              DroolsAction action = actionExceptionHandler.getAction();
              if (action != null) {
                AbstractNodeHandler.writeAction(action, xmlDump);
              }
              xmlDump.append("      </exceptionHandler>" + EOL);
              } else {
View Full Code Here

Examples of org.drools.workflow.core.DroolsAction

          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);
                }
                ((ExtendedNodeImpl) node).setActions(type, actions);
            return;
          }
View Full Code Here

Examples of org.drools.workflow.core.DroolsAction

        super.handleNode(node, element, uri, localName, parser);
        ActionNode actionNode = (ActionNode) node;
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        if (xmlNode instanceof Element) {
        Element actionXml = (Element) xmlNode;
        DroolsAction action = extractAction(actionXml);
        actionNode.setAction(action);
        }
    }
View Full Code Here

Examples of org.drools.workflow.core.DroolsAction

    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

Examples of org.drools.workflow.core.DroolsAction

        }
        if (period != null && period.length() != 0 ) {
            timer.setPeriod(new Long(period));
        }
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        DroolsAction action = null;
        if (xmlNode instanceof Element) {
        Element actionXml = (Element) xmlNode;
        action = AbstractNodeHandler.extractAction(actionXml);
        }
        eventBasedNode.addTimer(timer, action);
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.