org.alfresco.repo.workflow
Interface TaskComponent

All Known Subinterfaces:
WorkflowEngine
All Known Implementing Classes:
ActivitiWorkflowEngine, JBPMEngine

public interface TaskComponent

SPI to be implemented by a BPM Engine that provides Task management.


Method Summary
 WorkflowTask endTask(java.lang.String taskId, java.lang.String transitionId)
          End the Task (i.e.
 java.util.List getAssignedTasks(java.lang.String authority, WorkflowTaskState state)
          Gets all tasks assigned to the specified authority
 java.util.List getPooledTasks(java.util.List authorities)
          Gets the pooled tasks available to the specified authority
 WorkflowTask getStartTask(java.lang.String workflowInstanceId)
          Gets all active timers for the specified workflow
 WorkflowTask getTaskById(java.lang.String taskId)
          Gets a Task by unique Id
 java.util.List queryTasks(WorkflowTaskQuery query)
          Query for tasks
 WorkflowTask startTask(java.lang.String taskId)
          Start the specified Task Note: this is an optional task operation.
 WorkflowTask suspendTask(java.lang.String taskId)
          Suspend the specified Task
 WorkflowTask updateTask(java.lang.String taskId, java.util.Map properties, java.util.Map add, java.util.Map remove)
          Update the Properties and Associations of a Task
 

Method Detail

getTaskById

WorkflowTask getTaskById(java.lang.String taskId)
Gets a Task by unique Id

Parameters:
taskId - the task id
Returns:
the task

getAssignedTasks

java.util.List getAssignedTasks(java.lang.String authority,
                                WorkflowTaskState state)
Gets all tasks assigned to the specified authority

Parameters:
authority - the authority
state - filter by specified workflow task state
Returns:
the list of assigned tasks

getPooledTasks

java.util.List getPooledTasks(java.util.List authorities)
Gets the pooled tasks available to the specified authority

Parameters:
authority - the authority
Returns:
the list of pooled tasks

queryTasks

java.util.List queryTasks(WorkflowTaskQuery query)
Query for tasks

Parameters:
query - the filter by which tasks are queried
Returns:
the list of tasks matching the specified query

updateTask

WorkflowTask updateTask(java.lang.String taskId,
                        java.util.Map properties,
                        java.util.Map add,
                        java.util.Map remove)
Update the Properties and Associations of a Task

Parameters:
taskId - the task id to update
properties - the map of properties to set on the task (or null, if none to set)
add - the map of items to associate with the task (or null, if none to add)
remove - the map of items to dis-associate with the task (or null, if none to remove)
Returns:
the update task

startTask

WorkflowTask startTask(java.lang.String taskId)
Start the specified Task Note: this is an optional task operation. It may be used to track when work started on a task as well as resume a suspended task.

Parameters:
taskId - the task to start
Returns:
the updated task

suspendTask

WorkflowTask suspendTask(java.lang.String taskId)
Suspend the specified Task

Parameters:
taskId -
Returns:
the update task

endTask

WorkflowTask endTask(java.lang.String taskId,
                     java.lang.String transitionId)
End the Task (i.e. complete the task)

Parameters:
taskId - the task id to end
transition - the task transition to take on completion (or null, for the default transition)
Returns:
the updated task

getStartTask

WorkflowTask getStartTask(java.lang.String workflowInstanceId)
Gets all active timers for the specified workflow

Returns:
the list of active timers


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.