/** * called by the implementation of this node to continue execution over the given transition. */ public void leave(ExecutionContext executionContext, Transition transition) { if (transition == null) throw new JbpmException("transition is null"); Token token = executionContext.getToken(); token.setNode(this); executionContext.setTransition(transition); // fire the leave-node event for this node fireEvent(Event.EVENTTYPE_NODE_LEAVE, executionContext); // log this node if (token.getNodeEnter() != null) { addNodeLog(token); } // update the runtime information for taking the transition // the transitionSource is used to calculate events on superstates executionContext.setTransitionSource(this); // take the transition transition.take(executionContext); }
/** * called by the implementation of this node to continue execution over the given transition. */ public void leave(ExecutionContext executionContext, Transition transition) { if (transition == null) throw new JbpmException("transition is null"); Token token = executionContext.getToken(); token.setNode(this); executionContext.setTransition(transition); // fire the leave-node event for this node fireEvent(Event.EVENTTYPE_NODE_LEAVE, executionContext); // log this node if (token.getNodeEnter() != null) { addNodeLog(token); } // update the runtime information for taking the transition // the transitionSource is used to calculate events on superstates executionContext.setTransitionSource(this); // take the transition transition.take(executionContext); }
/** * called by a transition to pass execution to this node. */ public void enter(ExecutionContext executionContext) { Token token = executionContext.getToken(); // update the runtime context information token.setNode(this); // register entrance time so that a node-log can be generated upon leaving token.setNodeEnter(Clock.getCurrentTime()); // fire the leave-node event for this node fireEvent(Event.EVENTTYPE_NODE_ENTER, executionContext); // remove the transition references from the runtime context executionContext.setTransition(null); executionContext.setTransitionSource(null); // execute the node if (isAsync) { ExecuteNodeJob job = createAsyncContinuationJob(token); executionContext.getJbpmContext().getServices().getMessageService().send(job); token.lock(job.toString()); } else { execute(executionContext); } }
/** * called by a transition to pass execution to this node. */ public void enter(ExecutionContext executionContext) { Token token = executionContext.getToken(); // update the runtime context information token.setNode(this); // register entrance time so that a node-log can be generated upon leaving token.setNodeEnter(Clock.getCurrentTime()); // fire the leave-node event for this node fireEvent(Event.EVENTTYPE_NODE_ENTER, executionContext); // remove the transition references from the runtime context executionContext.setTransition(null); executionContext.setTransitionSource(null); // execute the node if (isAsync) { ExecuteNodeJob job = createAsyncContinuationJob(token); executionContext.getJbpmContext().getServices().getMessageService().send(job); token.lock(job.toString()); } else { execute(executionContext); } }