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 Details

    • getTaskById

      WorkflowTask getTaskById(String taskId)
      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 authority
      state - filter by specified workflow task state
      lazyInitialization - hint in order to return partially-initialized entities
      Returns:
      the list of assigned tasks
    • getPooledTasks

      List<WorkflowTask> getPooledTasks(List<String> authorities, boolean lazyInitialization)
      Gets the pooled tasks available to the specified authority
      Parameters:
      authorities - the list of authorities
      lazyInitialization - hint in order to return partially-initialized entities
      Returns:
      the list of pooled tasks
    • queryTasks

      List<WorkflowTask> queryTasks(WorkflowTaskQuery query)
      Deprecated.
      Use overloaded method with the sameSession parameter (this method defaults the parameter to false).
    • queryTasks

      List<WorkflowTask> queryTasks(WorkflowTaskQuery query, boolean sameSession)
      Query for tasks Hint: use WorkflowTaskQuery setLimit() 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 queried
      sameSession - indicates that the returned WorkflowTask elements will be used in the same session. If true, 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(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 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(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(String taskId)
      Suspend the specified Task
      Parameters:
      taskId - String
      Returns:
      the update task
    • endTask

      WorkflowTask endTask(String taskId, String transitionId)
      End the Task (i.e. complete the task)
      Parameters:
      taskId - the task id to end
      transitionId - the task transition id to take on completion (or null, for the default transition)
      Returns:
      the updated task
    • getStartTask

      WorkflowTask getStartTask(String workflowInstanceId)
      Gets all active timers for the specified workflow
      Returns:
      the list of active timers
    • getStartTasks

      List<WorkflowTask> getStartTasks(List<String> workflowInstanceIds, boolean sameSession)
      Gets all start tasks for the specified workflow
      Returns:
      the list of start tasks