Package org.drools.workflow.core

Examples of org.drools.workflow.core.NodeContainer


    public Object start(final String uri, final String localName, final Attributes attrs,
                        final ExtensibleXmlParser parser) throws SAXException {
        parser.startElementBuilder( localName,
                                    attrs );

        NodeContainer nodeContainer = (NodeContainer) parser.getParent();

        final Node node = createNode();

        final String id = attrs.getValue("id");
        node.setId(new Long(id));

        final String name = attrs.getValue("name");
        node.setName(name);

        nodeContainer.addNode(node);

        return node;
    }
View Full Code Here


        emptyAttributeCheck( localName, "from", fromId, parser );
        String toId = attrs.getValue( "to" );
        emptyAttributeCheck( localName, "to", toId, parser );
        String bendpoints = attrs.getValue( "bendpoints" );
       
        NodeContainer nodeContainer = (NodeContainer) parser.getParent();
        Node fromNode = nodeContainer.getNode( new Long(fromId) );
        Node toNode = nodeContainer.getNode( new Long(toId) );
       
        if ( fromNode == null ) {
                throw new SAXParseException( "Node '" + fromId + "' cannot be found",
                                             parser.getLocator() );
        }
View Full Code Here

            node.setName(name);
            node.setId(new Integer(id));
        } catch (NumberFormatException e) {
            // id is not in the expected format, generating a new one
            long newId = 0;
            NodeContainer nodeContainer = (NodeContainer) parser.getParent();
            for (org.drools.definition.process.Node n: nodeContainer.getNodes()) {
                if (n.getId() > newId) {
                    newId = n.getId();
                }
            }
            ((org.drools.workflow.core.Node) node).setId(++newId);
View Full Code Here

    public Object end(final String uri, final String localName,
                      final ExtensibleXmlParser parser) throws SAXException {
        final Element element = parser.endElementBuilder();
        Node node = (Node) parser.getCurrent();
        handleNode(node, element, uri, localName, parser);
        NodeContainer nodeContainer = (NodeContainer) parser.getParent();
        nodeContainer.addNode(node);
        return node;
    }
View Full Code Here

                handleCompensationNode(node, element, uri, localName, parser, attachedTo, cancelActivity);
                break;
            }
            xmlNode = xmlNode.getNextSibling();
        }
        NodeContainer nodeContainer = (NodeContainer) parser.getParent();
        nodeContainer.addNode(node);
        return node;
    }
View Full Code Here

        // none event definition
        if (node.getAction() == null) {
            node.setAction(new DroolsConsequenceAction("mvel", ""));
            node.setMetaData("NodeType", "IntermediateThrowEvent-None");
        }
        NodeContainer nodeContainer = (NodeContainer) parser.getParent();
        nodeContainer.addNode(node);
        return node;
    }
View Full Code Here

                handleCompensationNode(node, element, uri, localName, parser);
                break;
            }
            xmlNode = xmlNode.getNextSibling();
        }
        NodeContainer nodeContainer = (NodeContainer) parser.getParent();
        nodeContainer.addNode(node);
        return node;
    }
View Full Code Here

                handleStateNode(node, element, uri, localName, parser);
                break;
            }
            xmlNode = xmlNode.getNextSibling();
        }
        NodeContainer nodeContainer = (NodeContainer) parser.getParent();
        nodeContainer.addNode(node);
        return node;
    }
View Full Code Here

      xmlNode = xmlNode.getNextSibling();
    }
    if (!found) {
      handleCompositeContextNode(node, element, uri, localName, parser);
    }
    NodeContainer nodeContainer = (NodeContainer) parser.getParent();
    nodeContainer.addNode(node);
    return node;
  }
View Full Code Here

    final String sourceRef = attrs.getValue("sourceRef");
    final String targetRef = attrs.getValue("targetRef");
    final String bendpoints = attrs.getValue("g:bendpoints");
    final String name = attrs.getValue("name");

    NodeContainer nodeContainer = (NodeContainer) parser.getParent();
   
    List<SequenceFlow> connections = null;
    if (nodeContainer instanceof RuleFlowProcess) {
      connections = (List<SequenceFlow>)
        ((RuleFlowProcess) nodeContainer).getMetaData(ProcessHandler.CONNECTIONS);     
View Full Code Here

TOP

Related Classes of org.drools.workflow.core.NodeContainer

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.