public void fireStartEvent(Node initialNode) { start = Clock.getCurrentTime(); // fire the process start event if (initialNode != null) { ExecutionContext executionContext = new ExecutionContext(rootToken); processDefinition.fireEvent(Event.EVENTTYPE_PROCESS_START, executionContext); // execute the start node initialNode.execute(executionContext); } }
public void fireStartEvent(Node initialNode) { start = Clock.getCurrentTime(); // fire the process start event if (initialNode != null) { ExecutionContext executionContext = new ExecutionContext(rootToken); processDefinition.fireEvent(Event.EVENTTYPE_PROCESS_START, executionContext); // execute the start node initialNode.execute(executionContext); } }
public boolean execute(JbpmContext jbpmContext) throws Exception { Token token = getToken(); token.unlock(toString()); ExecutionContext executionContext = new ExecutionContext(token); node.execute(executionContext); return true; }
public boolean execute(JbpmContext jbpmContext) throws Exception { Token token = getToken(); token.unlock(toString()); ExecutionContext executionContext = new ExecutionContext(token); node.execute(executionContext); return true; }
/** * 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); } }