/** * sends a signal to this token. leaves the current {@link #getNode() node} over the given * transition. */ public void signal(Transition transition) { signal(transition, new ExecutionContext(this)); }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the given * transition. */ public void signal(Transition transition) { signal(transition, new ExecutionContext(this)); }
public Map eval(Token token) { return eval(new ExecutionContext(token)); }
public Map eval(Token token) { return eval(new ExecutionContext(token)); }
public TaskInstance createTaskInstance(Token token) { return createTaskInstance(null, new ExecutionContext(token)); }
public TaskInstance createTaskInstance(Token token) { return createTaskInstance(null, new ExecutionContext(token)); }
public void notifyListeners() { if (listeners != null) { // for every token that was waiting for this milestone for (Iterator iter = listeners.iterator(); iter.hasNext();) { Token token = (Token) iter.next(); // leave the milestone node Node node = token.getNode(); ExecutionContext executionContext = new ExecutionContext(token); node.leave(executionContext); } } }
public void notifyListeners() { if (listeners != null) { // for every token that was waiting for this milestone for (Iterator iter = listeners.iterator(); iter.hasNext();) { Token token = (Token) iter.next(); // leave the milestone node Node node = token.getNode(); ExecutionContext executionContext = new ExecutionContext(token); node.leave(executionContext); } } }
/** * creates an instance of the given task, for the given token. */ public TaskInstance createTaskInstance(Task task, Token token) { ExecutionContext executionContext = new ExecutionContext(token); executionContext.setTask(task); return createTaskInstance(task, executionContext); }
/** * creates an instance of the given task, for the given token. */ public TaskInstance createTaskInstance(Task task, Token token) { ExecutionContext executionContext = new ExecutionContext(token); executionContext.setTask(task); return createTaskInstance(task, 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 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; }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the default * transition. */ public void signal() { if (node == null) { throw new JbpmException(this + " is not positioned in a node"); } Transition defaultTransition = node.getDefaultLeavingTransition(); if (defaultTransition == null) { throw new JbpmException(node + " has no default transition"); } signal(defaultTransition, new ExecutionContext(this)); }
/** * sends a signal to this token. leaves the current {@link #getNode() node} over the default * transition. */ public void signal() { if (node == null) { throw new JbpmException(this + " is not positioned in a node"); } Transition defaultTransition = node.getDefaultLeavingTransition(); if (defaultTransition == null) { throw new JbpmException(node + " has no default transition"); } signal(defaultTransition, new ExecutionContext(this)); }
/** * creates a task instance on the rootToken, and assigns it to the currently authenticated * user. */ public TaskInstance createStartTaskInstance() { TaskInstance taskInstance = null; Task startTask = taskMgmtDefinition.getStartTask(); if (startTask != null) { Token rootToken = processInstance.getRootToken(); ExecutionContext executionContext = new ExecutionContext(rootToken); taskInstance = createTaskInstance(startTask, executionContext); taskInstance.setActorId(SecurityHelper.getAuthenticatedActorId()); } return taskInstance; }
/** * creates a task instance on the rootToken, and assigns it to the currently authenticated * user. */ public TaskInstance createStartTaskInstance() { TaskInstance taskInstance = null; Task startTask = taskMgmtDefinition.getStartTask(); if (startTask != null) { Token rootToken = processInstance.getRootToken(); ExecutionContext executionContext = new ExecutionContext(rootToken); taskInstance = createTaskInstance(startTask, executionContext); taskInstance.setActorId(SecurityHelper.getAuthenticatedActorId()); } return taskInstance; }
public boolean execute(JbpmContext jbpmContext) throws Exception { Token token = getToken(); ExecutionContext executionContext = new ExecutionContext(token); executionContext.setAction(action); executionContext.setEvent(action.getEvent()); Node node; if (token != null && (node = token.getNode()) != null) { node.executeAction(action, executionContext); } else { action.execute(executionContext); } return true; }
public boolean execute(JbpmContext jbpmContext) throws Exception { Token token = getToken(); ExecutionContext executionContext = new ExecutionContext(token); executionContext.setAction(action); executionContext.setEvent(action.getEvent()); Node node; if (token != null && (node = token.getNode()) != null) { node.executeAction(action, executionContext); } else { action.execute(executionContext); } return true; }