public void leave(ExecutionContext executionContext, Transition transition) { TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance(); Token token = executionContext.getToken(); if (tmi.hasBlockingTaskInstances(token)) { throw new IllegalStateException(this + " still has blocking tasks"); } removeTaskInstanceSynchronization(token); super.leave(executionContext, transition); }
public void leave(ExecutionContext executionContext, Transition transition) { TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance(); Token token = executionContext.getToken(); if (tmi.hasBlockingTaskInstances(token)) { throw new IllegalStateException(this + " still has blocking tasks"); } removeTaskInstanceSynchronization(token); super.leave(executionContext, transition); }
public void execute(ExecutionContext executionContext) { TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance(); // if this tasknode should create instances if (createTasks && tasks != null) { for (Iterator iter = tasks.iterator(); iter.hasNext();) { Task task = (Task) iter.next(); executionContext.setTask(task); if (evaluateTaskCondition(task.getCondition(), executionContext)) { tmi.createTaskInstance(task, executionContext); } } } // check if we should continue execution boolean continueExecution; switch (signal) { case SIGNAL_UNSYNCHRONIZED: continueExecution = true; break; case SIGNAL_FIRST: case SIGNAL_LAST: continueExecution = tmi.getSignallingTasks(executionContext).isEmpty(); break; default: continueExecution = false; } if (continueExecution) leave(executionContext); }
public void execute(ExecutionContext executionContext) { TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance(); // if this tasknode should create instances if (createTasks && tasks != null) { for (Iterator iter = tasks.iterator(); iter.hasNext();) { Task task = (Task) iter.next(); executionContext.setTask(task); if (evaluateTaskCondition(task.getCondition(), executionContext)) { tmi.createTaskInstance(task, executionContext); } } } // check if we should continue execution boolean continueExecution; switch (signal) { case SIGNAL_UNSYNCHRONIZED: continueExecution = true; break; case SIGNAL_FIRST: case SIGNAL_LAST: continueExecution = tmi.getSignallingTasks(executionContext).isEmpty(); break; default: continueExecution = false; } if (continueExecution) leave(executionContext); }
if ("processDefinition".equals(name)) return executionContext.getProcessDefinition(); if ("token".equals(name)) return executionContext.getToken(); if ("taskMgmtInstance".equals(name)) return executionContext.getTaskMgmtInstance(); if ("contextInstance".equals(name)) return executionContext.getContextInstance(); TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance(); if (taskMgmtInstance != null) { SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance(name);
if ("processDefinition".equals(name)) return executionContext.getProcessDefinition(); if ("token".equals(name)) return executionContext.getToken(); if ("taskMgmtInstance".equals(name)) return executionContext.getTaskMgmtInstance(); if ("contextInstance".equals(name)) return executionContext.getContextInstance(); TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance(); if (taskMgmtInstance != null) { SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance(name);
public void assign(ExecutionContext executionContext) { TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance(); Swimlane swimlane = task.getSwimlane(); // if this task is in a swimlane if (swimlane != null) { // if this is a task assignment for a start-state if (isStartTaskInstance()) { // initialize the swimlane swimlaneInstance = new SwimlaneInstance(swimlane); taskMgmtInstance.addSwimlaneInstance(swimlaneInstance); // with the current authenticated actor swimlaneInstance.setActorId(SecurityHelper.getAuthenticatedActorId()); } // lazily initialize the swimlane... else { // get the swimlane instance (if there is any) swimlaneInstance = taskMgmtInstance.getInitializedSwimlaneInstance(executionContext, swimlane); // copy the swimlaneInstance assignment into the taskInstance assignment copySwimlaneInstanceAssignment(swimlaneInstance); } } else { // this task is not in a swimlane taskMgmtInstance.performAssignment(task.getAssignmentDelegation(), task.getActorIdExpression(), task.getPooledActorsExpression(), this, executionContext); } updatePooledActorsReferences(swimlaneInstance); }
public void assign(ExecutionContext executionContext) { TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance(); Swimlane swimlane = task.getSwimlane(); // if this task is in a swimlane if (swimlane != null) { // if this is a task assignment for a start-state if (isStartTaskInstance()) { // initialize the swimlane swimlaneInstance = new SwimlaneInstance(swimlane); taskMgmtInstance.addSwimlaneInstance(swimlaneInstance); // with the current authenticated actor swimlaneInstance.setActorId(SecurityHelper.getAuthenticatedActorId()); } // lazily initialize the swimlane... else { // get the swimlane instance (if there is any) swimlaneInstance = taskMgmtInstance.getInitializedSwimlaneInstance(executionContext, swimlane); // copy the swimlaneInstance assignment into the taskInstance assignment copySwimlaneInstanceAssignment(swimlaneInstance); } } else { // this task is not in a swimlane taskMgmtInstance.performAssignment(task.getAssignmentDelegation(), task.getActorIdExpression(), task.getPooledActorsExpression(), this, executionContext); } updatePooledActorsReferences(swimlaneInstance); }