Package org.jbpm.workflow.core.node

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


        }
    }
   
  protected void handleForEachNode(final Node node, final Element element, final String uri,
            final String localName, final ExtensibleXmlParser parser) throws SAXException {
      ForEachNode forEachNode = (ForEachNode) node;
      org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
            String nodeName = xmlNode.getNodeName();
            if ("dataInputAssociation".equals(nodeName)) {
                readDataInputAssociation(xmlNode, forEachNode);
View Full Code Here


                                "  <message id=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(eventType) + "\" itemRef=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(eventType) + "Type\" />" + EOL + EOL);
                        }
                    }
                }
            } else if (node instanceof ForEachNode) {
              ForEachNode forEachNode = (ForEachNode) node;
              String type = null;
              if (forEachNode.getVariableType() instanceof ObjectDataType) {
                type = ((ObjectDataType) forEachNode.getVariableType()).getClassName();
              }
                xmlDump.append(
                    "  <itemDefinition id=\"" + XmlBPMNProcessDumper.getUniqueNodeId(forEachNode) + "_multiInstanceItemType\" " +
                      (type == null || "java.lang.Object".equals(type) ? "" : "structureRef=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(type) + "\" ") + "/>" + EOL + EOL);
            }
View Full Code Here

                  for (Timer timer: workItemNode.getTimers().keySet()) {
                    validateTimer(timer, node, process, errors);
                  }
                }
            } else if (node instanceof ForEachNode) {
                final ForEachNode forEachNode = (ForEachNode) node;
                String variableName = forEachNode.getVariableName();
                if (variableName == null || "".equals(variableName)) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "ForEach node '" + node.getName() + "' [" + node.getId() + "] has no variable name"));
                }
                String collectionExpression = forEachNode.getCollectionExpression();
                if (collectionExpression == null || "".equals(collectionExpression)) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "ForEach node '" + node.getName() + "' [" + node.getId() + "] has no collection expression"));
                }
                if (forEachNode.getDefaultIncomingConnections().size() == 0 && !acceptsNoIncomingConnections(node)) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "ForEach node '" + node.getName() + "' [" + node.getId() + "] has no incoming connection"));
                }
                if (forEachNode.getDefaultOutgoingConnections().size() == 0 && !acceptsNoOutgoingConnections(node)) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "ForEach node '" + node.getName() + "' [" + node.getId() + "] has no outgoing connection"));
                }
                // TODO: check, if no linked connections, for start and end node(s)
//                if (forEachNode.getLinkedIncomingNode(org.drools.workflow.core.Node.CONNECTION_DEFAULT_TYPE) == null) {
//                    errors.add(new ProcessValidationErrorImpl(process,
//                        "ForEach node '" + node.getName() + "' [" + node.getId() + "] has no linked start node"));
//                }
//                if (forEachNode.getLinkedOutgoingNode(org.drools.workflow.core.Node.CONNECTION_DEFAULT_TYPE) == null) {
//                    errors.add(new ProcessValidationErrorImpl(process,
//                        "ForEach node '" + node.getName() + "' [" + node.getId() + "] has no linked end node"));
//                }
                validateNodes(forEachNode.getNodes(), errors, process);
            } else if (node instanceof DynamicNode) {
                final DynamicNode dynamicNode = (DynamicNode) node;
                if (dynamicNode.getDefaultIncomingConnections().size() == 0) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "Dynamic node '" + node.getName() + "' [" + node.getId() + "] has no incoming connection"));
View Full Code Here

  private long linkedOutgoingNodeId = -1;

    public ForEachNodeFactory(RuleFlowNodeContainerFactory nodeContainerFactory, NodeContainer nodeContainer, long id) {
      this.nodeContainerFactory = nodeContainerFactory;
      this.nodeContainer = nodeContainer;
      ForEachNode forEachNode = new ForEachNode();
        forEachNode.setId(id);
        setNodeContainer(forEachNode);
    }
View Full Code Here

        descriptors[descriptors.length - 1] =
            new TextPropertyDescriptor(END_NODE, "EndNodeId");
    }
   
    public ForEachNodeWrapper() {
        setNode(new ForEachNode());
        getForEachNode().setName("ForEach");
    }
View Full Code Here

//        descriptors[descriptors.length - 1] =
//            new TextPropertyDescriptor(END_NODE, "EndNodeId");
    }
   
    public ForEachNodeWrapper() {
        setNode(new ForEachNode());
        getForEachNode().setName("ForEach");
    }
View Full Code Here

//        descriptors[descriptors.length - 1] =
//            new TextPropertyDescriptor(END_NODE, "EndNodeId");
    }
   
    public ForEachNodeWrapper() {
        setNode(new ForEachNode());
        getForEachNode().setName("ForEach");
    }
View Full Code Here

TOP

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

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.