Interface TaskRuntime


public interface TaskRuntime
User Based Integrations against the Task Runtime
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCandidateGroups(org.activiti.api.task.model.payloads.CandidateGroupsPayload candidateGroupsPayload)
     
    void
    addCandidateUsers(org.activiti.api.task.model.payloads.CandidateUsersPayload candidateUsersPayload)
     
    org.activiti.api.task.model.Task
    assign(org.activiti.api.task.model.payloads.AssignTaskPayload assignTaskPayload)
    Assign a task that has been claimed before to a different user - Only the current assignee can perform the action - The new assignee should be part of the candidate users for this task
    org.activiti.api.task.model.Task
    claim(org.activiti.api.task.model.payloads.ClaimTaskPayload claimTaskPayload)
    Claim a task with the currently authenticated user - If there is no authenticated user throw an IllegalStateException - If the currently authenticated user is not a candidate throw an IllegalStateException - The current approach doesn't support impersonation, it will always take the currently authenticated user - after the claim the task should be in assigned status
    org.activiti.api.task.model.Task
    complete(org.activiti.api.task.model.payloads.CompleteTaskPayload completeTaskPayload)
    Completes the selected task with the variables set in the payload - This method checks that the task is visible by the authenticated user - This method also check that the task is assigned to the currently authenticated user before complete - This method return a shallow Task object with the basic information needed to validate that the task was completed
     
    org.activiti.api.task.model.Task
    create(org.activiti.api.task.model.payloads.CreateTaskPayload createTaskPayload)
    Creates a task based on the following rules - If an assignee is provided it creates and assign the task to the provided user - If there is no assignee the task is not assigned, just created - The owner of the task is the currently authenticated user (which is automatically added as a candidate) - If a group or list of groups is provided those groups are added as candidates for claiming the task
    void
    createVariable(org.activiti.api.task.model.payloads.CreateTaskVariablePayload createTaskVariablePayload)
     
    org.activiti.api.task.model.Task
    delete(org.activiti.api.task.model.payloads.DeleteTaskPayload deleteTaskPayload)
    Deletes a task - The authenticated user should be able to see the task in order to delete it - The authenticated user needs to be the assignee of the task in order to delete it - this method returns a shallow Task with the necessary information to validate that the task was deleted
    void
    deleteCandidateGroups(org.activiti.api.task.model.payloads.CandidateGroupsPayload candidateGroupsPayload)
     
    void
    deleteCandidateUsers(org.activiti.api.task.model.payloads.CandidateUsersPayload candidateUsersPayload)
     
     
    org.activiti.api.task.model.Task
    release(org.activiti.api.task.model.payloads.ReleaseTaskPayload releaseTaskPayload)
    Release a previously claimed task - The authenticated user needs to be the assignee in order to release it
    void
    save(org.activiti.api.task.model.payloads.SaveTaskPayload saveTaskPayload)
    Saves the selected task with the variables set in the payload in the task scope - This method checks that the task is visible by the authenticated user - This method also check that the task is assigned to the currently authenticated user
    org.activiti.api.task.model.Task
    task(String taskId)
    Get task by id if the authenticated user: - is the assignee or - is in a group with is assigned to the task or - has admin role
    org.activiti.api.runtime.shared.query.Page<org.activiti.api.task.model.Task>
    tasks(org.activiti.api.runtime.shared.query.Pageable pageable)
    Get all tasks where - the authenticated user is the actual assignee - the user belongs to a group that is a candidate for the task
    org.activiti.api.runtime.shared.query.Page<org.activiti.api.task.model.Task>
    tasks(org.activiti.api.runtime.shared.query.Pageable pageable, org.activiti.api.task.model.payloads.GetTasksPayload getTasksPayload)
    Get all tasks where applying the filters in the Payload - the authenticated user is the actual assignee - the user belongs to a group that is a candidate for the task
    org.activiti.api.task.model.Task
    update(org.activiti.api.task.model.payloads.UpdateTaskPayload updateTaskPayload)
    Updates details of a task - The authenticated user should be able to see the task in order to update its details - The authenticated user needs to be the assignee of the task to update its details, if not he/she will need to claim the task first
    void
    updateVariable(org.activiti.api.task.model.payloads.UpdateTaskVariablePayload updateTaskVariablePayload)
     
     
    List<org.activiti.api.model.shared.model.VariableInstance>
    variables(org.activiti.api.task.model.payloads.GetTaskVariablesPayload getTaskVariablesPayload)
     
  • Method Details

    • configuration

      TaskRuntimeConfiguration configuration()
    • task

      org.activiti.api.task.model.Task task(String taskId)
      Get task by id if the authenticated user: - is the assignee or - is in a group with is assigned to the task or - has admin role
    • tasks

      org.activiti.api.runtime.shared.query.Page<org.activiti.api.task.model.Task> tasks(org.activiti.api.runtime.shared.query.Pageable pageable)
      Get all tasks where - the authenticated user is the actual assignee - the user belongs to a group that is a candidate for the task
    • tasks

      org.activiti.api.runtime.shared.query.Page<org.activiti.api.task.model.Task> tasks(org.activiti.api.runtime.shared.query.Pageable pageable, org.activiti.api.task.model.payloads.GetTasksPayload getTasksPayload)
      Get all tasks where applying the filters in the Payload - the authenticated user is the actual assignee - the user belongs to a group that is a candidate for the task
    • create

      org.activiti.api.task.model.Task create(org.activiti.api.task.model.payloads.CreateTaskPayload createTaskPayload)
      Creates a task based on the following rules - If an assignee is provided it creates and assign the task to the provided user - If there is no assignee the task is not assigned, just created - The owner of the task is the currently authenticated user (which is automatically added as a candidate) - If a group or list of groups is provided those groups are added as candidates for claiming the task
    • claim

      org.activiti.api.task.model.Task claim(org.activiti.api.task.model.payloads.ClaimTaskPayload claimTaskPayload)
      Claim a task with the currently authenticated user - If there is no authenticated user throw an IllegalStateException - If the currently authenticated user is not a candidate throw an IllegalStateException - The current approach doesn't support impersonation, it will always take the currently authenticated user - after the claim the task should be in assigned status
    • release

      org.activiti.api.task.model.Task release(org.activiti.api.task.model.payloads.ReleaseTaskPayload releaseTaskPayload)
      Release a previously claimed task - The authenticated user needs to be the assignee in order to release it
    • complete

      org.activiti.api.task.model.Task complete(org.activiti.api.task.model.payloads.CompleteTaskPayload completeTaskPayload)
      Completes the selected task with the variables set in the payload - This method checks that the task is visible by the authenticated user - This method also check that the task is assigned to the currently authenticated user before complete - This method return a shallow Task object with the basic information needed to validate that the task was completed
    • save

      void save(org.activiti.api.task.model.payloads.SaveTaskPayload saveTaskPayload)
      Saves the selected task with the variables set in the payload in the task scope - This method checks that the task is visible by the authenticated user - This method also check that the task is assigned to the currently authenticated user
    • update

      org.activiti.api.task.model.Task update(org.activiti.api.task.model.payloads.UpdateTaskPayload updateTaskPayload)
      Updates details of a task - The authenticated user should be able to see the task in order to update its details - The authenticated user needs to be the assignee of the task to update its details, if not he/she will need to claim the task first
    • delete

      org.activiti.api.task.model.Task delete(org.activiti.api.task.model.payloads.DeleteTaskPayload deleteTaskPayload)
      Deletes a task - The authenticated user should be able to see the task in order to delete it - The authenticated user needs to be the assignee of the task in order to delete it - this method returns a shallow Task with the necessary information to validate that the task was deleted
    • createVariable

      void createVariable(org.activiti.api.task.model.payloads.CreateTaskVariablePayload createTaskVariablePayload)
    • updateVariable

      void updateVariable(org.activiti.api.task.model.payloads.UpdateTaskVariablePayload updateTaskVariablePayload)
    • variables

      List<org.activiti.api.model.shared.model.VariableInstance> variables(org.activiti.api.task.model.payloads.GetTaskVariablesPayload getTaskVariablesPayload)
    • addCandidateUsers

      void addCandidateUsers(org.activiti.api.task.model.payloads.CandidateUsersPayload candidateUsersPayload)
    • deleteCandidateUsers

      void deleteCandidateUsers(org.activiti.api.task.model.payloads.CandidateUsersPayload candidateUsersPayload)
    • addCandidateGroups

      void addCandidateGroups(org.activiti.api.task.model.payloads.CandidateGroupsPayload candidateGroupsPayload)
    • deleteCandidateGroups

      void deleteCandidateGroups(org.activiti.api.task.model.payloads.CandidateGroupsPayload candidateGroupsPayload)
    • userCandidates

      List<String> userCandidates(String taskId)
    • groupCandidates

      List<String> groupCandidates(String taskId)
    • assign

      org.activiti.api.task.model.Task assign(org.activiti.api.task.model.payloads.AssignTaskPayload assignTaskPayload)
      Assign a task that has been claimed before to a different user - Only the current assignee can perform the action - The new assignee should be part of the candidate users for this task