Package org.jbpm.workflow.core.node

Examples of org.jbpm.workflow.core.node.SubProcessNode


    String to = subNode.getTextContent();
    subProcessNode.addOutMapping(dataOutputs.get(from), to);
    }

  public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) {
    SubProcessNode subProcessNode = (SubProcessNode) node;
    writeNode("callActivity", subProcessNode, xmlDump, metaDataType);
    if (subProcessNode.getProcessId() != null) {
      xmlDump.append("calledElement=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(subProcessNode.getProcessId()) + "\" ");
    }
    if (!subProcessNode.isWaitForCompletion()) {
      xmlDump.append("tns:waitForCompletion=\"false\" ");
    }
    if (!subProcessNode.isIndependent()) {
      xmlDump.append("tns:independent=\"false\" ");
    }
    xmlDump.append(">" + EOL);
    writeScripts(subProcessNode, xmlDump);
    writeIO(subProcessNode, xmlDump);
View Full Code Here


                    errors.add(new ProcessValidationErrorImpl(process,
                        "State node '" + node.getName() + "' [" + node.getId() + "] has no incoming connection"));
                }
            }
            else if (node instanceof SubProcessNode) {
                final SubProcessNode subProcess = (SubProcessNode) node;
                if (subProcess.getFrom() == null && !acceptsNoIncomingConnections(node)) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "SubProcess node '" + node.getName() + "' [" + node.getId() + "] has no incoming connection."));
                }
                if (subProcess.getTo() == null && !acceptsNoOutgoingConnections(node)) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "SubProcess node '" + node.getName() + "' [" + node.getId() + "] has no outgoing connection."));
                }
                if (subProcess.getProcessId() == null) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "SubProcess node '" + node.getName() + "' [" + node.getId() + "] has no process id."));
                }
                if (subProcess.getTimers() != null) {
                  for (Timer timer: subProcess.getTimers().keySet()) {
                    validateTimer(timer, node, process, errors);
                  }
                }
            } else if (node instanceof ActionNode) {
                final ActionNode actionNode = (ActionNode) node;
View Full Code Here

        StartNode startNode = new StartNode();
        startNode.setName( "Start" );
        startNode.setId(1);

        SubProcessNode subProcessNode = new SubProcessNode();
        subProcessNode.setId(2);
        subProcessNode.setProcessId(subProcessId);
        subProcessNode.setName("subProcess");

        EndNode endNode = new EndNode();
        endNode.setName("EndNode");
        endNode.setId(4);
View Full Code Here

    public SubProcessNodeFactory(RuleFlowNodeContainerFactory nodeContainerFactory, NodeContainer nodeContainer, long id) {
        super(nodeContainerFactory, nodeContainer, id);
    }

    protected Node createNode() {
        return new SubProcessNode();
    }
View Full Code Here

        process.addNode( actionNode );
        new ConnectionImpl( start,
                            Node.CONNECTION_DEFAULT_TYPE,
                            actionNode,
                            Node.CONNECTION_DEFAULT_TYPE );
        SubProcessNode subProcessNode = new SubProcessNode();
        subProcessNode.setId( 3 );
        subProcessNode.setName( "SubProcess" );
        subProcessNode.setProcessId( "org.drools.test.SubProcess" );
        process.addNode( subProcessNode );
        new ConnectionImpl( actionNode,
                            Node.CONNECTION_DEFAULT_TYPE,
                            subProcessNode,
                            Node.CONNECTION_DEFAULT_TYPE );
View Full Code Here

        RuleFlowProcess process = new RuleFlowProcess();
        process.setId(processId);
        StartNode startNode = new StartNode();
        startNode.setName("Start");
        startNode.setId(1);
        SubProcessNode subProcessNode = new SubProcessNode();
        subProcessNode.setId(2);
        subProcessNode.setProcessId(subProcessId);
        subProcessNode.setName("subProcess");
        EndNode endNode = new EndNode();
        endNode.setName("EndNode");
        endNode.setId(4);
        connect(startNode, subProcessNode);
        connect(subProcessNode, endNode);
View Full Code Here

        process.addNode( actionNode );
        new ConnectionImpl( start,
                            Node.CONNECTION_DEFAULT_TYPE,
                            actionNode,
                            Node.CONNECTION_DEFAULT_TYPE );
        SubProcessNode subProcessNode = new SubProcessNode();
        subProcessNode.setId( 3 );
        subProcessNode.setName( "SubProcess" );
        subProcessNode.setProcessId( "org.drools.test.SubProcess" );
        process.addNode( subProcessNode );
        new ConnectionImpl( actionNode,
                            Node.CONNECTION_DEFAULT_TYPE,
                            subProcessNode,
                            Node.CONNECTION_DEFAULT_TYPE );
View Full Code Here

    public static final String INDEPENDENT = "Independent";
    public static final String PARAMETER_IN_MAPPING = "ParameterInMapping";
    public static final String PARAMETER_OUT_MAPPING = "ParameterOutMapping";

    public SubProcessWrapper() {
        setNode(new SubProcessNode());
        getSubProcessNode().setName("SubProcess");
    }
View Full Code Here

      } else if (currentNode instanceof RuleSetNode) {
        testCode +=
          "        ksession.fireAllRules();\n";
        return processNodes(name, ((NodeImpl) currentNode).getTo().getTo(), testCode, cases, ongoingCases);
      } else if (currentNode instanceof SubProcessNode) {
        SubProcessNode subProcessNode = (SubProcessNode) currentNode;
        if (subProcessNode.isWaitForCompletion()) {
          testCode +=
              "        // invoking subprocess " + subProcessNode.getProcessId() + ", if necessary make sure it is completed\n";
        }
        return processNodes(name, ((NodeImpl) currentNode).getTo().getTo(), testCode, cases, ongoingCases);
      } else if (currentNode instanceof FaultNode) {
        FaultNode faultNode = (FaultNode) currentNode;
        testCode +=
View Full Code Here

        process.addNode( actionNode );
        new ConnectionImpl( start,
                            Node.CONNECTION_DEFAULT_TYPE,
                            actionNode,
                            Node.CONNECTION_DEFAULT_TYPE );
        SubProcessNode subProcessNode = new SubProcessNode();
        subProcessNode.setId( 3 );
        subProcessNode.setName( "SubProcess" );
        subProcessNode.setProcessId( "org.drools.test.SubProcess" );
        process.addNode( subProcessNode );
        new ConnectionImpl( actionNode,
                            Node.CONNECTION_DEFAULT_TYPE,
                            subProcessNode,
                            Node.CONNECTION_DEFAULT_TYPE );
View Full Code Here

TOP

Related Classes of org.jbpm.workflow.core.node.SubProcessNode

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.