public void moveTo(NodeImpl destination) { // if the parent node needs to know the previous node if (destination.isPreviousNeeded()) { setPreviousNode(getNode()); setPreviousTransition(getTransition()); } else { this.previousNode = null; this.previousTransition = null; } // move the execution to the destination node = destination; transition = null; transitionOrigin = null; }
/** @see Execution#takeDefaultTransition() */ public void take(Transition transition) { checkLock(); setPropagation(Propagation.EXPLICIT); setTransition((TransitionImpl) transition); // copy the current node as the transition origin. the origin can be different from // the transition source in case a transition is taken from an enclosing node setTransitionOrigin(getNode()); setPreviousTransition(null); performAtomicOperation(TAKE_TRANSITION); }
public ExecutionImpl createScope(CompositeElementImpl scope) { ExecutionImpl child = createExecution(scope.getName()); // copy the current state from the child execution to the parent execution child.setNode(getNode()); child.setTransition(getTransition()); child.setPropagation(getPropagation()); child.setTransitionOrigin(getTransitionOrigin()); child.setPreviousTransition(getPreviousTransition()); child.setPreviousNode(getPreviousNode()); child.initializeVariables(scope, this); child.initializeTimers(scope); return child; }
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; }