public void cancel() { while (!nodeInstances.isEmpty()) { NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0); ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel(); } super.cancel(); }
public void triggerCompleted(String outType) { boolean cancelRemainingInstances = getCompositeNode().isCancelRemainingInstances(); ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel()); triggerCompleted(outType, cancelRemainingInstances); if (cancelRemainingInstances) { while (!nodeInstances.isEmpty()) { NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0); ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel(); } } }
public void execute(ProcessContext context) throws Exception { WorkflowProcessInstance pi = context.getNodeInstance().getProcessInstance(); NodeInstance nodeInstance = findNodeByUniqueId(pi.getNodeInstances(), attachedToNodeId); if (nodeInstance != null) { ((org.jbpm.workflow.instance.NodeInstance)nodeInstance).cancel(); } }
protected org.jbpm.workflow.instance.NodeInstance followConnection(Connection connection) { // check for exclusive group first NodeInstanceContainer parent = getNodeInstanceContainer(); if (parent instanceof ContextInstanceContainer) { List<ContextInstance> contextInstances = ((ContextInstanceContainer) parent).getContextInstances(ExclusiveGroup.EXCLUSIVE_GROUP); if (contextInstances != null) { for (ContextInstance contextInstance: new ArrayList<ContextInstance>(contextInstances)) { ExclusiveGroupInstance groupInstance = (ExclusiveGroupInstance) contextInstance; if (groupInstance.containsNodeInstance(this)) { for (NodeInstance nodeInstance: groupInstance.getNodeInstances()) { if (nodeInstance != this) { ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel(); } } ((ContextInstanceContainer) parent).removeContextInstance(ExclusiveGroup.EXCLUSIVE_GROUP, contextInstance); } } } } return (org.jbpm.workflow.instance.NodeInstance) ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()) .getNodeInstance(connection.getTo()); }
} else { while (!getNodeInstanceContainer().getNodeInstances().isEmpty()) { ((org.jbpm.workflow.instance.NodeInstance) getNodeInstanceContainer().getNodeInstances().iterator().next()).cancel();
NodeInstance nodeInstance = nodeInstances.get(0); ((org.jbpm.workflow.instance.NodeInstance) nodeInstance) .cancel();
Collection<NodeInstance> nodeInstances = ((WorkflowProcessInstance) nodeInstanceContainer).getNodeInstances(); for (NodeInstance nodeInstance: nodeInstances) { ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel();
public void cancel() { while (!nodeInstances.isEmpty()) { NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0); ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel(); } super.cancel(); }
public void triggerCompleted(String outType) { boolean cancelRemainingInstances = getCompositeNode().isCancelRemainingInstances(); ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel()); triggerCompleted(outType, cancelRemainingInstances); if (cancelRemainingInstances) { while (!nodeInstances.isEmpty()) { NodeInstance nodeInstance = (NodeInstance) nodeInstances.get(0); ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel(); } } }
public void execute(ProcessContext context) throws Exception { WorkflowProcessInstance pi = context.getNodeInstance().getProcessInstance(); NodeInstance nodeInstance = findNodeByUniqueId(pi.getNodeInstances(), attachedToNodeId); if (nodeInstance != null) { ((org.jbpm.workflow.instance.NodeInstance)nodeInstance).cancel(); } }
protected org.jbpm.workflow.instance.NodeInstance followConnection(Connection connection) { // check for exclusive group first NodeInstanceContainer parent = getNodeInstanceContainer(); if (parent instanceof ContextInstanceContainer) { List<ContextInstance> contextInstances = ((ContextInstanceContainer) parent).getContextInstances(ExclusiveGroup.EXCLUSIVE_GROUP); if (contextInstances != null) { for (ContextInstance contextInstance: new ArrayList<ContextInstance>(contextInstances)) { ExclusiveGroupInstance groupInstance = (ExclusiveGroupInstance) contextInstance; if (groupInstance.containsNodeInstance(this)) { for (NodeInstance nodeInstance: groupInstance.getNodeInstances()) { if (nodeInstance != this) { ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel(); } } ((ContextInstanceContainer) parent).removeContextInstance(ExclusiveGroup.EXCLUSIVE_GROUP, contextInstance); } } } } return (org.jbpm.workflow.instance.NodeInstance) ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()) .getNodeInstance(connection.getTo()); }
} else { while (!getNodeInstanceContainer().getNodeInstances().isEmpty()) { ((org.jbpm.workflow.instance.NodeInstance) getNodeInstanceContainer().getNodeInstances().iterator().next()).cancel();
NodeInstance nodeInstance = nodeInstances.get(0); ((org.jbpm.workflow.instance.NodeInstance) nodeInstance) .cancel();
Collection<NodeInstance> nodeInstances = ((WorkflowProcessInstance) nodeInstanceContainer).getNodeInstances(); for (NodeInstance nodeInstance: nodeInstances) { ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).cancel();