/** * Ends all executions in the given list. */ protected void endJoinedExecutions(List<ExecutionImpl> joinedExecutions) { for (ExecutionImpl joinedExecution: joinedExecutions) { joinedExecution.end(); } }
public void cancel() { end(Execution.STATE_CANCELLED); }
public void end() { end(Execution.STATE_ENDED); }
public void proceed() { checkLock(); // in graph based processDefinition languages we assume that a // default transition is available TransitionImpl defaultTransition = findDefaultTransition(); if (defaultTransition!=null) { take(defaultTransition); // in block structured processDefinition languages we assume that // there is no default transition and that there is a // parent node of the current node } else { NodeImpl parentNode = node.getParentNode(); // if there is a parent node if (parentNode!=null) { // propagate to the parent performAtomicOperation(PROPAGATE_TO_PARENT); } else { // When we don't know how to proceed, i don't know if it's best to // throw new PvmException("don't know how to proceed"); // or to end the execution. Because of convenience for testing, // I opted to end the execution. end(); } } }
child.end(state);
public ExecutionImpl destroyScope(CompositeElementImpl scope) { destroyTimers(scope); destroyVariables(scope, parent); // copy the current state from the child execution to the parent execution getParent().setNode(getNode()); getParent().setTransition(getTransition()); getParent().setPropagation(getPropagation()); getParent().setTransitionOrigin(getTransitionOrigin()); getParent().setPreviousTransition(getPreviousTransition()); getParent().setPreviousNode(getPreviousNode()); end(); parent.removeExecution(this); return parent; }