private org.jbpm.taskmgmt.exe.TaskInstance getTaskInstance() { if (!enabled) { return null; } else { return TaskInstance.instance(); } }
protected TaskInstance getTaskInstance() { return org.jboss.seam.bpm.TaskInstance.instance(); }
/** * Check that the task currently associated with the conversation * exists and has not ended. * * @return true if the task exists and was not ended */ public boolean validateTask() { if ( !hasCurrentTask() ) { taskNotFound(taskId); return false; } else if ( org.jboss.seam.bpm.TaskInstance.instance().hasEnded() ) { taskEnded(taskId); return false; } else { return true; } }
/** * Start the current task, using the current actor id * * @see Actor */ public void startTask() { String actorId = Actor.instance().getId(); TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance(); if ( actorId != null ) { task.start(actorId); } else { task.start(); } Events.instance().raiseEvent("org.jboss.seam.startTask." + task.getTask().getName()); }
TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance(); if (task==null)
/** * Associate the task instance with the given id with the current * conversation. * * @param taskId the jBPM task instance id * @return true if the task was found and was not ended */ public boolean resumeTask(Long taskId) { setTaskId(taskId); TaskInstance task = org.jboss.seam.bpm.TaskInstance.instance(); if (task==null) { taskNotFound(taskId); return false; } else if ( task.hasEnded() ) { taskEnded(taskId); return false; } else { setProcessId( task.getTaskMgmtInstance().getProcessInstance().getId() ); Events.instance().raiseEvent("org.jboss.seam.initTask." + task.getTask().getName()); return true; } }