Package org.alfresco.repo.workflow
Interface TaskComponent
- All Known Subinterfaces:
WorkflowEngine
- All Known Implementing Classes:
ActivitiWorkflowEngine
public interface TaskComponent
SPI to be implemented by a BPM Engine that provides Task management.
- Author:
- davidc
-
Method Summary
Modifier and TypeMethodDescriptionlongcountTasks(WorkflowTaskQuery query) Count the number of active tasks that match the given query.End the Task (i.e.getAssignedTasks(String authority, WorkflowTaskState state, boolean lazyInitialization) Gets all tasks assigned to the specified authoritygetPooledTasks(List<String> authorities, boolean lazyInitialization) Gets the pooled tasks available to the specified authoritygetStartTask(String workflowInstanceId) Gets all active timers for the specified workflowgetStartTasks(List<String> workflowInstanceIds, boolean sameSession) Gets all start tasks for the specified workflowgetTaskById(String taskId) Gets a Task by unique IdqueryTasks(WorkflowTaskQuery query) Deprecated.queryTasks(WorkflowTaskQuery query, boolean sameSession) Query for tasks Hint: useWorkflowTaskQuerysetLimit() method to limit the number of processed items if you don't really need to go through all of themStart the specified Task Note: this is an optional task operation.suspendTask(String taskId) Suspend the specified TaskupdateTask(String taskId, Map<QName, Serializable> properties, Map<QName, List<NodeRef>> add, Map<QName, List<NodeRef>> remove) Update the Properties and Associations of a Task
-
Method Details
-
getTaskById
Gets a Task by unique Id- Parameters:
taskId- the task id- Returns:
- the task
-
getAssignedTasks
List<WorkflowTask> getAssignedTasks(String authority, WorkflowTaskState state, boolean lazyInitialization) Gets all tasks assigned to the specified authority- Parameters:
authority- the authoritystate- filter by specified workflow task statelazyInitialization- hint in order to return partially-initialized entities- Returns:
- the list of assigned tasks
-
getPooledTasks
Gets the pooled tasks available to the specified authority- Parameters:
authorities- the list of authoritieslazyInitialization- hint in order to return partially-initialized entities- Returns:
- the list of pooled tasks
-
queryTasks
Deprecated.Use overloaded method with thesameSessionparameter (this method defaults the parameter tofalse). -
queryTasks
Query for tasks Hint: useWorkflowTaskQuerysetLimit() method to limit the number of processed items if you don't really need to go through all of them- Parameters:
query- the filter by which tasks are queriedsameSession- indicates that the returnedWorkflowTaskelements will be used in the same session. Iftrue, the returned List will be a lazy loaded list providing greater performance.- Returns:
- the list of tasks matching the specified query
-
countTasks
Count the number of active tasks that match the given query.- Parameters:
query- the filter by which tasks are queried- Returns:
- number of matching tasks.
-
updateTask
WorkflowTask updateTask(String taskId, Map<QName, Serializable> properties, Map<QName, List<NodeRef>> add, Map<QName, List<NodeRef>> remove) Update the Properties and Associations of a Task- Parameters:
taskId- the task id to updateproperties- 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
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
Suspend the specified Task- Parameters:
taskId- String- Returns:
- the update task
-
endTask
End the Task (i.e. complete the task)- Parameters:
taskId- the task id to endtransitionId- the task transition id to take on completion (or null, for the default transition)- Returns:
- the updated task
-
getStartTask
Gets all active timers for the specified workflow- Returns:
- the list of active timers
-
getStartTasks
Gets all start tasks for the specified workflow- Returns:
- the list of start tasks
-
sameSessionparameter (this method defaults the parameter tofalse).