Examples of SubProcessNode


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

    public void handleNode(final Node node, final Element element, final String uri,
            final String localName, final ExtensibleXmlParser parser)
            throws SAXException {
        super.handleNode(node, element, uri, localName, parser);
        SubProcessNode subProcessNode = (SubProcessNode) node;
        String processId = element.getAttribute("processId");
        if (processId != null && processId.length() > 0) {
          subProcessNode.setProcessId(processId);
        }
        String waitForCompletion = element.getAttribute("waitForCompletion");
        subProcessNode.setWaitForCompletion(!"false".equals(waitForCompletion));
        String independent = element.getAttribute("independent");
        subProcessNode.setIndependent(!"false".equals(independent));
        for (String eventType: subProcessNode.getActionTypes()) {
          handleAction(subProcessNode, element, eventType);
        }
    }
View Full Code Here

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

  public Class generateNodeFor() {
        return SubProcessNode.class;
    }

  public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) {
    SubProcessNode subProcessNode = (SubProcessNode) node;
    writeNode("subProcess", subProcessNode, xmlDump, includeMeta);
        String processId = subProcessNode.getProcessId();
        if (processId != null) {
            xmlDump.append("processId=\"" + processId + "\" ");
        }
        if (!subProcessNode.isWaitForCompletion()) {
            xmlDump.append("waitForCompletion=\"false\" ");
        }
        if (!subProcessNode.isIndependent()) {
            xmlDump.append("independent=\"false\" ");
        }
        xmlDump.append(">" + EOL);
        if (includeMeta) {
          writeMetaData(subProcessNode, xmlDump);
        }
        Map<String, String> inMappings = subProcessNode.getInMappings();
        for (Map.Entry<String, String> inMapping: inMappings.entrySet()) {
            xmlDump.append(
                "      <mapping type=\"in\" "
                             + "from=\"" + inMapping.getValue() + "\" "
                             + "to=\"" + inMapping.getKey() + "\" />" + EOL);
        }
        Map<String, String> outMappings = subProcessNode.getOutMappings();
        for (Map.Entry<String, String> outMapping: outMappings.entrySet()) {
            xmlDump.append(
                "      <mapping type=\"out\" "
                             + "from=\"" + outMapping.getKey() + "\" "
                             + "to=\"" + outMapping.getValue() + "\" />" + EOL);
        }
        for (String eventType: subProcessNode.getActionTypes()) {
          writeActions(eventType, subProcessNode.getActions(eventType), xmlDump);
        }
        writeTimers(subProcessNode.getTimers(), xmlDump);
        endNode("subProcess", xmlDump);
  }
View Full Code Here

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

import org.xml.sax.SAXException;

public class CallActivityHandler extends AbstractNodeHandler {
   
    protected Node createNode(Attributes attrs) {
        return new SubProcessNode();
    }
View Full Code Here

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

    }

    protected void handleNode(final Node node, final Element element, final String uri,
            final String localName, final ExtensibleXmlParser parser) throws SAXException {
      super.handleNode(node, element, uri, localName, parser);
      SubProcessNode subProcessNode = (SubProcessNode) node;
    String processId = element.getAttribute("calledElement");
    if (processId != null) {
      subProcessNode.setProcessId(processId);
    }
    String waitForCompletion = element.getAttribute("waitForCompletion");
    if (waitForCompletion != null && "false".equals(waitForCompletion)) {
      subProcessNode.setWaitForCompletion(false);
    }
    String independent = element.getAttribute("independent");
    if (independent != null && "false".equals(independent)) {
      subProcessNode.setIndependent(false);
    }
      Map<String, String> dataInputs = new HashMap<String, String>();
      Map<String, String> dataOutputs = new HashMap<String, String>();
      org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
View Full Code Here

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

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

                    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

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

        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

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

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

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

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

        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

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

        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
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.