public void setExecution(ExecutionImpl execution) { this.execution = execution; this.processInstance = execution.getProcessInstance(); }
@Override public XpdlExecution getProcessInstance() { return (XpdlExecution) super.getProcessInstance(); }
public void setExecution(ExecutionImpl execution) { this.execution = execution; this.processInstance = (execution!=null ? execution.getProcessInstance() : null); }
public MessageImpl(ExecutionImpl execution) { this.execution = execution; this.processInstance = execution.getProcessInstance(); }
OpenExecution executionToEnd = null; if (endProcessInstance) { executionToEnd = execution.getProcessInstance(); } else { executionToEnd = execution;
/** * Section 14.3.2 of the BPMN 2.0 specification. * * The Inclusive Gateway is activated if * - At least one incoming sequence flow has at least one Token and * - for each empty incoming sequence flow, there is no Token in the graph anywhere * upstream of this sequence flow, i.e., there is no directed path (formed by Sequence Flow) * from a Token to this sequence flow unless * - the path visits the inclusive gateway or * - the path visits a node that has a directed path to a non-empty incoming sequence * flow of the inclusive gateway. */ protected boolean isComplete(ExecutionImpl incomingExecution) { String currentActivityId = incomingExecution.getActivityName(); // id is stored in the name attribute Collection<ExecutionImpl> allExecutions = incomingExecution.getProcessInstance().getExecutions(); BpmnProcessDefinition processDefinition = (BpmnProcessDefinition) incomingExecution.getProcessDefinition(); for (ExecutionImpl execution : allExecutions) { if (incomingExecution.getParent().equals(execution.getParent())) { String activityId = execution.getActivityName(); // id is stored in the name attribute if (activityId != null && !currentActivityId.equals(activityId)) { if (processDefinition.isReachable(activityId, currentActivityId)) { return false; } } } } return true; }
task.setTaskDefinition(taskDefinition); task.setExecution(execution); task.setProcessInstance(execution.getProcessInstance()); task.setSignalling(true);