Examples of FaultNode


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

    }
   
    protected void visitErrors(Node[] nodes, StringBuilder xmlDump, List<String> errors) {
        for (Node node: nodes) {
            if (node instanceof FaultNode) {
              FaultNode faultNode = (FaultNode) node;
              if (faultNode.isTerminateParent()) {
                String errorCode = faultNode.getFaultName();
                if (!errors.contains(errorCode)) {
                  errors.add(errorCode);
                      xmlDump.append(
                          "  <error id=\"" + XmlDumper.replaceIllegalChars(errorCode) + "\" errorCode=\"" + XmlDumper.replaceIllegalChars(errorCode) + "\" />" + EOL);
                }
View Full Code Here

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

        process.addNode(new TimerNode());
        process.addNode(new HumanTaskNode());
        process.addNode(new ForEachNode());
        process.addNode(new CompositeContextNode());
        process.addNode(new EventNode());
        process.addNode(new FaultNode());
        process.addNode(new StateNode());
        process.addNode(new DynamicNode());
       
        String xml = XmlRuleFlowProcessDumper.INSTANCE.dump(process, false);
        if (xml == null) {
View Full Code Here

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

        timer.setPeriod("200");
        action = new DroolsConsequenceAction("dialect", "consequence");
        ruleSetNode.addTimer(timer, action);
        process.addNode(ruleSetNode);
       
        FaultNode faultNode = new FaultNode();
        faultNode.setName("action");
        faultNode.setMetaData("x", 1);
        faultNode.setMetaData("y", 2);
        faultNode.setMetaData("width", 3);
        faultNode.setMetaData("height", 4);
        faultNode.setFaultName("faultName");
        faultNode.setFaultVariable("faultVariable");
        process.addNode(faultNode);
       
        Split split = new Split();
        split.setName("split");
        split.setMetaData("x", 1);
View Full Code Here

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

                    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

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

import org.xml.sax.SAXException;

public class FaultNodeHandler extends AbstractNodeHandler {

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

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

    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);
        FaultNode faultNode = (FaultNode) node;
        String faultName = element.getAttribute("faultName");
        if (faultName != null && faultName.length() != 0 ) {
            faultNode.setFaultName(faultName);
        }
        String faultVariable = element.getAttribute("faultVariable");
        if (faultVariable != null && !"".equals(faultVariable) ) {
            faultNode.setFaultVariable(faultVariable);
        }
    }
View Full Code Here

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

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

  public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) {
    FaultNode faultNode = (FaultNode) node;
    writeNode("fault", faultNode, xmlDump, includeMeta);
    String faultName = faultNode.getFaultName();
    if (faultName != null && faultName.length() != 0) {
            xmlDump.append("faultName=\"" + faultName + "\" ");
        }
    String faultVariable = faultNode.getFaultVariable();
    if (faultVariable != null && faultVariable.length() != 0) {
            xmlDump.append("faultVariable=\"" + faultVariable + "\" ");
        }
        endNode(xmlDump);
  }
View Full Code Here

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

import org.xml.sax.SAXException;

public class FaultNodeHandler extends AbstractNodeHandler {

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

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

    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);
        FaultNode faultNode = (FaultNode) node;
        String faultName = element.getAttribute("faultName");
        if (faultName != null && faultName.length() != 0 ) {
            faultNode.setFaultName(faultName);
        }
        String faultVariable = element.getAttribute("faultVariable");
        if (faultVariable != null && !"".equals(faultVariable) ) {
            faultNode.setFaultVariable(faultVariable);
        }
    }
View Full Code Here

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

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

  public void writeNode(Node node, StringBuffer xmlDump, boolean includeMeta) {
    FaultNode faultNode = (FaultNode) node;
    writeNode("fault", faultNode, xmlDump, includeMeta);
    String faultName = faultNode.getFaultName();
    if (faultName != null && faultName.length() != 0) {
            xmlDump.append("faultName=\"" + faultName + "\" ");
        }
    String faultVariable = faultNode.getFaultVariable();
    if (faultVariable != null && faultVariable.length() != 0) {
            xmlDump.append("faultVariable=\"" + faultVariable + "\" ");
        }
        endNode(xmlDump);
  }
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.