Package org.alfresco.repo.workflow
Interface TaskComponent
-
- All Known Subinterfaces:
WorkflowEngine
- All Known Implementing Classes:
ActivitiWorkflowEngine
public interface TaskComponentSPI to be implemented by a BPM Engine that provides Task management.- Author:
- davidc
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description longcountTasks(WorkflowTaskQuery query)Count the number of active tasks that match the given query.WorkflowTaskendTask(java.lang.String taskId, java.lang.String transitionId)End the Task (i.e.java.util.List<WorkflowTask>getAssignedTasks(java.lang.String authority, WorkflowTaskState state, boolean lazyInitialization)Gets all tasks assigned to the specified authorityjava.util.List<WorkflowTask>getPooledTasks(java.util.List<java.lang.String> authorities, boolean lazyInitialization)Gets the pooled tasks available to the specified authorityWorkflowTaskgetStartTask(java.lang.String workflowInstanceId)Gets all active timers for the specified workflowjava.util.List<WorkflowTask>getStartTasks(java.util.List<java.lang.String> workflowInstanceIds, boolean sameSession)Gets all start tasks for the specified workflowWorkflowTaskgetTaskById(java.lang.String taskId)Gets a Task by unique Idjava.util.List<WorkflowTask>queryTasks(WorkflowTaskQuery query)Deprecated.Use overloaded method with thesameSessionparameter (this method defaults the parameter tofalse).java.util.List<WorkflowTask>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 themWorkflowTaskstartTask(java.lang.String taskId)Start the specified Task Note: this is an optional task operation.WorkflowTasksuspendTask(java.lang.String taskId)Suspend the specified TaskWorkflowTaskupdateTask(java.lang.String taskId, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties, java.util.Map<org.alfresco.service.namespace.QName,java.util.List<org.alfresco.service.cmr.repository.NodeRef>> add, java.util.Map<org.alfresco.service.namespace.QName,java.util.List<org.alfresco.service.cmr.repository.NodeRef>> 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<WorkflowTask> getAssignedTasks(java.lang.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
java.util.List<WorkflowTask> getPooledTasks(java.util.List<java.lang.String> authorities, boolean lazyInitialization)
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
java.util.List<WorkflowTask> queryTasks(WorkflowTaskQuery query)
Deprecated.Use overloaded method with thesameSessionparameter (this method defaults the parameter tofalse).
-
queryTasks
java.util.List<WorkflowTask> 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 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
long countTasks(WorkflowTaskQuery query)
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(java.lang.String taskId, java.util.Map<org.alfresco.service.namespace.QName,java.io.Serializable> properties, java.util.Map<org.alfresco.service.namespace.QName,java.util.List<org.alfresco.service.cmr.repository.NodeRef>> add, java.util.Map<org.alfresco.service.namespace.QName,java.util.List<org.alfresco.service.cmr.repository.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
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- String- 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 endtransitionId- the task transition id 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
-
getStartTasks
java.util.List<WorkflowTask> getStartTasks(java.util.List<java.lang.String> workflowInstanceIds, boolean sameSession)
Gets all start tasks for the specified workflow- Returns:
- the list of start tasks
-
-