Package org.drools.definition.process

Examples of org.drools.definition.process.Node


    public WorkItemNodeFactory workItemNode(long id) {
      return new WorkItemNodeFactory(this, nodeContainer, id);
    }

    public RuleFlowNodeContainerFactory connection(long fromId, long toId) {
        Node from = nodeContainer.getNode(fromId);
        Node to = nodeContainer.getNode(toId);
        new ConnectionImpl(
            from, org.drools.workflow.core.Node.CONNECTION_DEFAULT_TYPE,
            to, org.drools.workflow.core.Node.CONNECTION_DEFAULT_TYPE);
        return this;
    }
View Full Code Here


            throw new IllegalArgumentException( "Could not read process" );
        }
        log.debug( "Processing " + process.getId() );
        result = new HashMap<String, String[]>();
        StartNode start = process.getStart();
        Node target = start.getTo().getTo();
        if ( target instanceof Split ) {
            Split split = (Split) target;
            for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                Constraint constraint = split.getConstraint( connection );
                if ( constraint != null ) {
View Full Code Here

        if ( process == null ) {
            throw new IllegalArgumentException( "Could not read process" );
        } else {
            log.debug( "Processing " + process.getId() );
            StartNode start = process.getStart();
            Node target = start.getTo().getTo();
            if ( target instanceof Split ) {
                Split split = (Split) target;
                for ( Connection connection : split.getDefaultOutgoingConnections() ) {
                    String s = constraints.get( XmlBPMNProcessDumper.getUniqueNodeId( connection.getTo() ) );
                    if ( s != null ) {
View Full Code Here

                event.getProcessInstance().getProcessName(),
                event.getProcessInstance().getId()) );
    }
   
    private String createNodeId(NodeInstance nodeInstance) {
        Node node = nodeInstance.getNode();
        if (node == null) {
            return "";
        }
        String nodeId = "" + node.getId();
        NodeContainer nodeContainer = node.getNodeContainer();
        while (nodeContainer != null) {
            if (nodeContainer instanceof Node) {
                node = (Node) nodeContainer;
                nodeContainer = node.getNodeContainer();
                // TODO fix this filter out hidden compositeNode inside ForEach node
                if (!(nodeContainer.getClass().getName().endsWith("ForEachNode"))) {
                    nodeId = node.getId() + ":" + nodeId;
                }
            } else {
                break;
            }
        }
View Full Code Here

                event.getProcessInstance().getProcessName(),
                event.getProcessInstance().getId()) );
    }
   
    private String createNodeId(NodeInstance nodeInstance) {
      Node node = nodeInstance.getNode();
      if (node == null) {
        return "";
      }
      String nodeId = "" + node.getId();
      NodeContainer nodeContainer = node.getNodeContainer();
      while (nodeContainer != null) {
        if (nodeContainer instanceof Node) {
          node = (Node) nodeContainer;
          nodeContainer = node.getNodeContainer();
          // TODO fix this filter out hidden compositeNode inside ForEach node
          if (!(nodeContainer.getClass().getName().endsWith("ForEachNode"))) {
              nodeId = node.getId() + ":" + nodeId;
          }
        } else {
          break;
        }
      }
View Full Code Here

    protected Process createProcess() {
        return new RuleFlowProcess();
    }

    protected void internalAddElement(ElementWrapper element) {
        Node node = ((NodeWrapper) element).getNode();
        long id = 0;
        for (Node n: getRuleFlowProcess().getNodes()) {
            if (n.getId() > id) {
                id = n.getId();
            }
View Full Code Here

                event.getProcessInstance().getProcessName(),
                event.getProcessInstance().getId()) );
    }
   
    private String createNodeId(NodeInstance nodeInstance) {
      Node node = ((org.drools.workflow.instance.NodeInstance) nodeInstance).getNode();
      String nodeId = "" + node.getId();
      NodeContainer nodeContainer = node.getNodeContainer();
      while (nodeContainer != null) {
        if (nodeContainer instanceof CompositeNode) {
          node = (CompositeNode) nodeContainer;
          nodeId = node.getId() + ":" + nodeId;
          nodeContainer = node.getNodeContainer();
        } else {
          break;
        }
      }
      return nodeId;
View Full Code Here

        super.removeIncomingConnection(type, connection);
        CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type);
        if (nodeAndType != null) {
          for (Connection inConnection: nodeAndType.getNode().getIncomingConnections(nodeAndType.getType())) {
              if (((CompositeNodeStart) inConnection.getFrom()).getInNodeId() == connection.getFrom().getId()) {
                  Node compositeNodeStart = inConnection.getFrom();
                  ((ConnectionImpl) inConnection).terminate();
                  internalRemoveNode(compositeNodeStart);
                  return;
              }
          }
View Full Code Here

        super.removeOutgoingConnection(type, connection);
        CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type);
        if (nodeAndType != null) {
          for (Connection outConnection: nodeAndType.getNode().getOutgoingConnections(nodeAndType.getType())) {
              if (((CompositeNodeEnd) outConnection.getTo()).getOutNodeId() == connection.getTo().getId()) {
                  Node compositeNodeEnd = outConnection.getTo();
                  ((ConnectionImpl) outConnection).terminate();
                  internalRemoveNode(compositeNodeEnd);
                  return;
              }
          }
View Full Code Here

            triggerCompleted(workItem);
        }
    }
   
    public String getNodeName() {
      Node node = getNode();
      if (node == null) {
        String nodeName =  "[Dynamic]";
        WorkItem workItem = getWorkItem();
        if (workItem != null) {
          nodeName += " " + workItem.getParameter("TaskName");
View Full Code Here

TOP

Related Classes of org.drools.definition.process.Node

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.