Examples of NodeInstance


Examples of org.drools.workflow.instance.NodeInstance

        }
    }

    public void cancel() {
        while (!nodeInstances.isEmpty()) {
            NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0);
            ((org.drools.workflow.instance.NodeInstance) nodeInstance).cancel();
        }
        super.cancel();
    }
View Full Code Here

Examples of org.drools.workflow.instance.NodeInstance

    public Collection<NodeInstance> getNodeInstances(boolean recursive) {
        Collection<NodeInstance> result = nodeInstances;
        if (recursive) {
            result = new ArrayList<NodeInstance>(result);
            for (Iterator<NodeInstance> iterator = nodeInstances.iterator(); iterator.hasNext(); ) {
                NodeInstance nodeInstance = iterator.next();
                if (nodeInstance instanceof NodeInstanceContainer) {
                    result.addAll(((NodeInstanceContainer)
                    nodeInstance).getNodeInstances(true));
                }
            }
View Full Code Here

Examples of org.drools.workflow.instance.NodeInstance

    return null;
  }

    public NodeInstance getFirstNodeInstance(final long nodeId) {
        for ( final Iterator<NodeInstance> iterator = this.nodeInstances.iterator(); iterator.hasNext(); ) {
            final NodeInstance nodeInstance = iterator.next();
            if ( nodeInstance.getNodeId() == nodeId ) {
                return nodeInstance;
            }
        }
        return null;
    }
View Full Code Here

Examples of org.jbpm.api.NodeInstance

    }

    @Override
    public void start() {
        // We should check that the first node inside the process.nodes is a startEventNode
        NodeInstance startEventNode = NodeInstanceFactory.newNodeInstance(this, process.getNodes().get(0L));
        this.nodeContainer.addNodeInstance(startEventNode);
        this.status = STATUS.ACTIVE;
        startEventNode.trigger(null, null);
     
    }
View Full Code Here

Examples of org.jbpm.workflow.instance.NodeInstance

          for (Iterator<Connection> iterator = connections.iterator(); iterator.hasNext(); ) {
              Connection connection = iterator.next();
              if ((connection.getFrom() instanceof CompositeNode.CompositeNodeStart) &&
                  (from == null ||
              ((CompositeNode.CompositeNodeStart) connection.getFrom()).getInNode().getId() == from.getNodeId())) {
                  NodeInstance nodeInstance = getNodeInstance(connection.getFrom());
                  ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).trigger(null, nodeAndType.getType());
                  return;
              }
          }
        } else {
          // try to search for start nodes
          boolean found = false;
          for (Node node: getCompositeNode().getNodes()) {
            if (node instanceof StartNode) {
              StartNode startNode = (StartNode) node;
              if (startNode.getTriggers() == null || startNode.getTriggers().isEmpty()) {
                      NodeInstance nodeInstance = getNodeInstance(startNode);
                      ((org.jbpm.workflow.instance.NodeInstance) nodeInstance)
                        .trigger(null, null);
                      found = true;
              }
            }
View Full Code Here

Examples of org.jbpm.workflow.instance.NodeInstance

    public void triggerCompleted(String outType) {
      boolean cancelRemainingInstances = getCompositeNode().isCancelRemainingInstances();
        triggerCompleted(outType, cancelRemainingInstances);
        if (cancelRemainingInstances) {
          while (!nodeInstances.isEmpty()) {
              NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0);
              ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel();
          }
        }
    }
View Full Code Here

Examples of org.jbpm.workflow.instance.NodeInstance

        }
    }

    public void cancel() {
        while (!nodeInstances.isEmpty()) {
            NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0);
            ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel();
        }
        super.cancel();
    }
View Full Code Here

Examples of org.jbpm.workflow.instance.NodeInstance

    public Collection<NodeInstance> getNodeInstances(boolean recursive) {
        Collection<NodeInstance> result = nodeInstances;
        if (recursive) {
            result = new ArrayList<NodeInstance>(result);
            for (Iterator<NodeInstance> iterator = nodeInstances.iterator(); iterator.hasNext(); ) {
                NodeInstance nodeInstance = iterator.next();
                if (nodeInstance instanceof NodeInstanceContainer) {
                    result.addAll(((NodeInstanceContainer)
                    nodeInstance).getNodeInstances(true));
                }
            }
View Full Code Here

Examples of org.jbpm.workflow.instance.NodeInstance

    return null;
  }

    public NodeInstance getFirstNodeInstance(final long nodeId) {
        for ( final Iterator<NodeInstance> iterator = this.nodeInstances.iterator(); iterator.hasNext(); ) {
            final NodeInstance nodeInstance = iterator.next();
            if ( nodeInstance.getNodeId() == nodeId ) {
                return nodeInstance;
            }
        }
        return null;
    }
View Full Code Here

Examples of org.jbpm.workflow.instance.NodeInstance

  public List<NodeInstance> getNodeInstances(final long nodeId) {
    List<NodeInstance> result = new ArrayList<NodeInstance>();
    for (final Iterator<NodeInstance> iterator = this.nodeInstances
        .iterator(); iterator.hasNext();) {
      final NodeInstance nodeInstance = iterator.next();
      if (nodeInstance.getNodeId() == nodeId) {
        result.add(nodeInstance);
      }
    }
    return result;
  }
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.