public void perform(ExecutionImpl execution) { NodeImpl destination = execution.getTransition().getDestination(); execution.setNode(destination); List<NodeImpl> enteredNodes = getNodesEntered(execution.getTransitionOrigin(), destination); ExecutionImpl propagatingExecution = execution; for (NodeImpl enteredNode : enteredNodes) { propagatingExecution = propagatingExecution.beginNode(enteredNode); } // Restore original transition source node // (so that the call to moveTo updates the previous node) propagatingExecution.setNode(execution.getTransitionOrigin()); propagatingExecution.moveTo(destination); propagatingExecution.performAtomicOperation(ExecutionImpl.EXECUTE_NODE); }
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; }