public NodeInstance getNodeInstance(long nodeInstanceId) { for (NodeInstance nodeInstance: nodeInstances) { if (nodeInstance.getId() == nodeInstanceId) { return nodeInstance; } } return null; }
private void throwWorkflowRuntimeException(NodeInstanceContainer nodeInstanceContainer, ProcessInstance processInstance, String msg, Exception e) { if( nodeInstanceContainer instanceof NodeInstance ) { throw new WorkflowRuntimeException((org.kie.api.runtime.process.NodeInstance) nodeInstanceContainer, processInstance, msg, e ); } else { throw new WorkflowRuntimeException(null, processInstance, msg, e ); } } }
@Override public void cancel() { getProcessInstance().removeEventListener(getEventType(), getEventListener(), true); ((NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this); } }
@Override public void triggerCompleted() { getProcessInstance().removeEventListener(getEventType(), getEventListener(), true); ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel()); ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()).removeNodeInstance(this); NodeInstance instance = ((org.jbpm.workflow.instance.NodeInstanceContainer) getNodeInstanceContainer()).getNodeInstance(getNode()); triggerNodeInstance((org.jbpm.workflow.instance.NodeInstance) instance, NodeImpl.CONNECTION_DEFAULT_TYPE); }
public NodeInstance getNodeInstance(long nodeInstanceId, boolean recursive) { for (NodeInstance nodeInstance: getNodeInstances(recursive)) { if (nodeInstance.getId() == nodeInstanceId) { return nodeInstance; } } return null; }
public NodeInstance getNodeInstance(long nodeInstanceId, boolean recursive) { for (NodeInstance nodeInstance: getNodeInstances(recursive)) { if (nodeInstance.getId() == nodeInstanceId) { return nodeInstance; } } return null; }
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 triggerCompleted() { ((org.jbpm.workflow.instance.NodeInstanceContainer)getNodeInstanceContainer()).setCurrentLevel(getLevel()); triggerCompleted(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, true); } }
protected void addTimerListener() { ((WorkflowProcessInstance) getProcessInstance()).addEventListener("timerTriggered", this, false); ((WorkflowProcessInstance) getProcessInstance()).addEventListener("timer", this, true); ((WorkflowProcessInstance) getProcessInstance()).addEventListener("slaViolation:" + getId(), this, true); }
public void removeEventListeners() { ((WorkflowProcessInstance) getProcessInstance()).removeEventListener("timerTriggered", this, false); ((WorkflowProcessInstance) getProcessInstance()).removeEventListener("timer", this, true); ((WorkflowProcessInstance) getProcessInstance()).removeEventListener("slaViolation:" + getId(), this, true); }
private void addActivationListener() { getProcessInstance().addEventListener(getActivationType(), this, true); }
public void addExceptionProcessListener() { if (exceptionHandlingProcessInstanceId > -1) { getProcessInstance().addEventListener("processInstanceCompleted:" + exceptionHandlingProcessInstanceId, this, true); } }
protected String getActivationType() { return "RuleFlowStateEvent-" + this.getProcessInstance().getProcessId(); }
public boolean isResolveable(String name) { boolean found = nodeInstance.resolveContextInstance(VariableScope.VARIABLE_SCOPE, name) != null; if (!found) { return extraParameters.containsKey(name); } return found; }
public WorkflowRuntimeException(NodeInstance nodeInstance, ProcessInstance processInstance, String message, Throwable e) { super(message, e); initialize(nodeInstance, processInstance); }
public void setNodeInstanceContainer(NodeInstanceContainer nodeInstanceContainer) { this.nodeInstanceContainer = (org.jbpm.workflow.instance.NodeInstanceContainer) nodeInstanceContainer; if (nodeInstanceContainer != null) { this.nodeInstanceContainer.addNodeInstance(this); } }
public NodeInstance getNodeInstance(long nodeInstanceId) { for (NodeInstance nodeInstance: nodeInstances) { if (nodeInstance.getId() == nodeInstanceId) { return nodeInstance; } } return null; }
private void addWorkItemListener() { getProcessInstance().addEventListener("workItemCompleted", this, false); getProcessInstance().addEventListener("workItemAborted", this, false); }
public WorkflowRuntimeException(NodeInstance nodeInstance, ProcessInstance processInstance, String message) { super(message); initialize(nodeInstance, processInstance); }
public WorkflowRuntimeException(NodeInstance nodeInstance, ProcessInstance processInstance, Exception e) { super(e); initialize(nodeInstance, processInstance); }