Package org.jbpm.workflow.core.node

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


    }
   
    @SuppressWarnings("unchecked")
  public void handleEscalationNode(final Node node, final Element element, final String uri,
            final String localName, final ExtensibleXmlParser parser) throws SAXException {
        FaultNode faultNode = (FaultNode) node;
        org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
            String nodeName = xmlNode.getNodeName();
            if ("dataInputAssociation".equals(nodeName)) {
                readFaultDataInputAssociation(xmlNode, faultNode);
            } else if ("escalationEventDefinition".equals(nodeName)) {
                String escalationRef = ((Element) xmlNode).getAttribute("escalationRef");
                if (escalationRef != null && escalationRef.trim().length() > 0) {
                    Map<String, Escalation> escalations = (Map<String, Escalation>)
                    ((ProcessBuildData) parser.getData()).getMetaData("Escalations");
                if (escalations == null) {
                    throw new IllegalArgumentException("No escalations found");
                }
                Escalation escalation = escalations.get(escalationRef);
                if (escalation == null) {
                    throw new IllegalArgumentException("Could not find escalation " + escalationRef);
                }
                faultNode.setFaultName(escalation.getEscalationCode());
                }
            }
            xmlNode = xmlNode.getNextSibling();
        }
    }
View Full Code Here


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

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

                    errors.add(new ProcessValidationErrorImpl(process,
                        "Event node '" + node.getName() + "' [" + node.getId() + "] has no outgoing connection"));
                }
            } else if (node instanceof FaultNode) {
              endNodeFound = true;
                final FaultNode faultNode = (FaultNode) node;
              if (faultNode.getFrom() == null && !acceptsNoIncomingConnections(node)) {
                    errors.add(new ProcessValidationErrorImpl(process,
                        "Fault node '" + node.getName() + "' [" + node.getId() + "] has no incoming connection."));
                }
              if (faultNode.getFaultName() == null) {
                errors.add(new ProcessValidationErrorImpl(process,
                        "Fault node '" + node.getName() + "' [" + node.getId() + "] has no fault name."));
              }
            } else if (node instanceof TimerNode) {
              TimerNode timerNode = (TimerNode) node;
View Full Code Here

          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 +=
          "        // handle fault " + faultNode.getFaultName() + " if necessary\n";
        return true;
      } else if (currentNode instanceof Join) {
        // TODO looping
        Join join = (Join) currentNode;
        switch (join.getType()) {
View Full Code Here

        descriptors[descriptors.length - 1] =
            new TextPropertyDescriptor(FAULT_VARIABLE, "FaultVariable");
    }

    public FaultNodeWrapper() {
        setNode(new FaultNode());
        getFaultNode().setName("Fault");
    }
View Full Code Here

TOP

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

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.