Package org.drools.workflow.instance

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


    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

    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

  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

    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(((org.drools.workflow.instance.NodeInstanceContainer) nodeInstance)
                  .getNodeInstances(true));
        }
View Full Code Here

  }

  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

  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

      InternalWorkingMemory workingMemory = (InternalWorkingMemory) getWorkingMemory();
      ((EventSupport) getWorkingMemory()).getRuleFlowEventSupport()
          .fireBeforeRuleFlowProcessCompleted(this, workingMemory);
      // deactivate all node instances of this process instance
      while (!nodeInstances.isEmpty()) {
        NodeInstance nodeInstance = nodeInstances.get(0);
        ((org.drools.workflow.instance.NodeInstance) nodeInstance)
            .cancel();
      }
      removeEventListeners();
      workingMemory.removeProcessInstance(this);
View Full Code Here

    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(((org.drools.workflow.instance.NodeInstanceContainer) nodeInstance)
                  .getNodeInstances(true));
        }
View Full Code Here

  }

  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

TOP

Related Classes of org.drools.workflow.instance.NodeInstance

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.