Interface TaskService

  • All Known Implementing Classes:
    TaskServiceImpl

    public interface TaskService
    Service which provides access to Task and form related operations.
    Author:
    Tom Baeyens, Joram Barrez, Thorben Lindhauer
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void addCandidateGroup​(java.lang.String taskId, java.lang.String groupId)
      void addCandidateUser​(java.lang.String taskId, java.lang.String userId)
      void addComment​(java.lang.String taskId, java.lang.String processInstanceId, java.lang.String message)
      Deprecated.
      void addGroupIdentityLink​(java.lang.String taskId, java.lang.String groupId, java.lang.String identityLinkType)
      Involves a group with a task.
      void addUserIdentityLink​(java.lang.String taskId, java.lang.String userId, java.lang.String identityLinkType)
      Involves a user with a task.
      void claim​(java.lang.String taskId, java.lang.String userId)
      Claim responsibility for a task: the given user is made assignee for the task.
      void complete​(java.lang.String taskId)
      Marks a task as done and continues process execution.
      void complete​(java.lang.String taskId, java.util.Map<java.lang.String,​java.lang.Object> variables)
      Marks a task as done and continues process execution.
      VariableMap completeWithVariablesInReturn​(java.lang.String taskId, java.util.Map<java.lang.String,​java.lang.Object> variables, boolean deserializeValues)
      Marks a task as done and continues process execution.
      Attachment createAttachment​(java.lang.String attachmentType, java.lang.String taskId, java.lang.String processInstanceId, java.lang.String attachmentName, java.lang.String attachmentDescription, java.io.InputStream content)
      Add a new attachment to a task and/or a process instance and use an input stream to provide the content please use method in runtime service to operate on process instance.
      Attachment createAttachment​(java.lang.String attachmentType, java.lang.String taskId, java.lang.String processInstanceId, java.lang.String attachmentName, java.lang.String attachmentDescription, java.lang.String url)
      Add a new attachment to a task and/or a process instance and use an url as the content please use method in runtime service to operate on process instance Either taskId or processInstanceId has to be provided
      Comment createComment​(java.lang.String taskId, java.lang.String processInstanceId, java.lang.String message)
      Creates a comment to a task and/or process instance and returns the comment.
      NativeTaskQuery createNativeTaskQuery()
      Returns a new
      TaskQuery createTaskQuery()
      Returns a new TaskQuery that can be used to dynamically query tasks.
      TaskReport createTaskReport()
      Instantiate a task report
      void delegateTask​(java.lang.String taskId, java.lang.String userId)
      Delegates the task to another user.
      void deleteAttachment​(java.lang.String attachmentId)
      Delete an attachment
      void deleteCandidateGroup​(java.lang.String taskId, java.lang.String groupId)
      void deleteCandidateUser​(java.lang.String taskId, java.lang.String userId)
      void deleteGroupIdentityLink​(java.lang.String taskId, java.lang.String groupId, java.lang.String identityLinkType)
      Removes the association between a group and a task for the given identityLinkType.
      void deleteTask​(java.lang.String taskId)
      Deletes the given task, not deleting historic information that is related to this task.
      void deleteTask​(java.lang.String taskId, boolean cascade)
      Deletes the given task.
      void deleteTask​(java.lang.String taskId, java.lang.String deleteReason)
      Deletes the given task, not deleting historic information that is related to this task.
      void deleteTaskAttachment​(java.lang.String taskId, java.lang.String attachmentId)
      Delete an attachment to the given task id and attachment id
      void deleteTasks​(java.util.Collection<java.lang.String> taskIds)
      Deletes all tasks of the given collection, not deleting historic information that is related to these tasks.
      void deleteTasks​(java.util.Collection<java.lang.String> taskIds, boolean cascade)
      Deletes all tasks of the given collection.
      void deleteTasks​(java.util.Collection<java.lang.String> taskIds, java.lang.String deleteReason)
      Deletes all tasks of the given collection, not deleting historic information that is related to these tasks.
      void deleteUserIdentityLink​(java.lang.String taskId, java.lang.String userId, java.lang.String identityLinkType)
      Removes the association between a user and a task for the given identityLinkType.
      Attachment getAttachment​(java.lang.String attachmentId)
      Retrieve a particular attachment
      java.io.InputStream getAttachmentContent​(java.lang.String attachmentId)
      Retrieve stream content of a particular attachment
      java.util.List<IdentityLink> getIdentityLinksForTask​(java.lang.String taskId)
      Retrieves the IdentityLinks associated with the given task.
      java.util.List<Attachment> getProcessInstanceAttachments​(java.lang.String processInstanceId)
      The list of attachments associated to a process instance
      java.util.List<Comment> getProcessInstanceComments​(java.lang.String processInstanceId)
      The comments related to the given process instance.
      java.util.List<Task> getSubTasks​(java.lang.String parentTaskId)
      The list of subtasks for this parent task
      Attachment getTaskAttachment​(java.lang.String taskId, java.lang.String attachmentId)
      Retrieve a particular attachment to the given task id and attachment id
      java.io.InputStream getTaskAttachmentContent​(java.lang.String taskId, java.lang.String attachmentId)
      Retrieve stream content of a particular attachment to the given task id and attachment id
      java.util.List<Attachment> getTaskAttachments​(java.lang.String taskId)
      The list of attachments associated to a task
      Comment getTaskComment​(java.lang.String taskId, java.lang.String commentId)
      Retrieve a particular task comment
      java.util.List<Comment> getTaskComments​(java.lang.String taskId)
      The comments related to the given task.
      java.util.List<Event> getTaskEvents​(java.lang.String taskId)
      Deprecated.
      This method has been deprecated as of Camunda Platform 7.1.
      java.lang.Object getVariable​(java.lang.String taskId, java.lang.String variableName)
      Get a variables and search in the task scope and if available also the execution scopes.
      java.lang.Object getVariableLocal​(java.lang.String taskId, java.lang.String variableName)
      Get a variables and only search in the task scope.
      <T extends TypedValue>
      T
      getVariableLocalTyped​(java.lang.String taskId, java.lang.String variableName)
      Get a variables and only search in the task scope.
      <T extends TypedValue>
      T
      getVariableLocalTyped​(java.lang.String taskId, java.lang.String variableName, boolean deserializeValue)
      Get a variables and only search in the task scope.
      java.util.Map<java.lang.String,​java.lang.Object> getVariables​(java.lang.String taskId)
      Get all variables and search in the task scope and if available also the execution scopes.
      java.util.Map<java.lang.String,​java.lang.Object> getVariables​(java.lang.String taskId, java.util.Collection<java.lang.String> variableNames)
      Get values for all given variableNames
      java.util.Map<java.lang.String,​java.lang.Object> getVariablesLocal​(java.lang.String taskId)
      Get all variables and search only in the task scope.
      java.util.Map<java.lang.String,​java.lang.Object> getVariablesLocal​(java.lang.String taskId, java.util.Collection<java.lang.String> variableNames)
      Get a variable on a task
      VariableMap getVariablesLocalTyped​(java.lang.String taskId)
      Get all variables and search only in the task scope.
      VariableMap getVariablesLocalTyped​(java.lang.String taskId, boolean deserializeValues)
      Get all variables and search only in the task scope.
      VariableMap getVariablesLocalTyped​(java.lang.String taskId, java.util.Collection<java.lang.String> variableNames, boolean deserializeValues)
      Get values for all given variableName.
      VariableMap getVariablesTyped​(java.lang.String taskId)
      Get all variables and search in the task scope and if available also the execution scopes.
      VariableMap getVariablesTyped​(java.lang.String taskId, boolean deserializeValues)
      Get all variables and search in the task scope and if available also the execution scopes.
      VariableMap getVariablesTyped​(java.lang.String taskId, java.util.Collection<java.lang.String> variableNames, boolean deserializeValues)
      Get values for all given variableName
      <T extends TypedValue>
      T
      getVariableTyped​(java.lang.String taskId, java.lang.String variableName)
      Get a variables and search in the task scope and if available also the execution scopes.
      <T extends TypedValue>
      T
      getVariableTyped​(java.lang.String taskId, java.lang.String variableName, boolean deserializeValue)
      Get a variables and search in the task scope and if available also the execution scopes.
      void handleBpmnError​(java.lang.String taskId, java.lang.String errorCode)
      Signals that a business error appears, which should be handled by the process engine.
      void handleBpmnError​(java.lang.String taskId, java.lang.String errorCode, java.lang.String errorMessage)  
      void handleBpmnError​(java.lang.String taskId, java.lang.String errorCode, java.lang.String errorMessage, java.util.Map<java.lang.String,​java.lang.Object> variables)  
      void handleEscalation​(java.lang.String taskId, java.lang.String escalationCode)
      Signals that an escalation appears, which should be handled by the process engine.
      void handleEscalation​(java.lang.String taskId, java.lang.String escalationCode, java.util.Map<java.lang.String,​java.lang.Object> variables)
      Signals that an escalation appears, which should be handled by the process engine.
      Task newTask()
      Creates a new task that is not related to any process instance.
      Task newTask​(java.lang.String taskId)
      create a new task with a user defined task id
      void removeVariable​(java.lang.String taskId, java.lang.String variableName)
      Removes the variable from the task.
      void removeVariableLocal​(java.lang.String taskId, java.lang.String variableName)
      Removes the variable from the task (not considering parent scopes).
      void removeVariables​(java.lang.String taskId, java.util.Collection<java.lang.String> variableNames)
      Removes all variables in the given collection from the task.
      void removeVariablesLocal​(java.lang.String taskId, java.util.Collection<java.lang.String> variableNames)
      Removes all variables in the given collection from the task (not considering parent scopes).
      void resolveTask​(java.lang.String taskId)
      Marks that the assignee is done with the task delegated to her and that it can be sent back to the owner.
      void resolveTask​(java.lang.String taskId, java.util.Map<java.lang.String,​java.lang.Object> variables)
      Marks that the assignee is done with the task delegated to her and that it can be sent back to the owner with the provided variables.
      void saveAttachment​(Attachment attachment)
      Update the name and decription of an attachment
      void saveTask​(Task task)
      Saves the given task to the persistent data store.
      void setAssignee​(java.lang.String taskId, java.lang.String userId)
      Changes the assignee of the given task to the given userId.
      void setOwner​(java.lang.String taskId, java.lang.String userId)
      Transfers ownership of this task to another user.
      void setPriority​(java.lang.String taskId, int priority)
      Changes the priority of the task.
      void setVariable​(java.lang.String taskId, java.lang.String variableName, java.lang.Object value)
      Set variable on a task.
      void setVariableLocal​(java.lang.String taskId, java.lang.String variableName, java.lang.Object value)
      Set variable on a task.
      void setVariables​(java.lang.String taskId, java.util.Map<java.lang.String,​? extends java.lang.Object> variables)
      Set variables on a task.
      void setVariablesLocal​(java.lang.String taskId, java.util.Map<java.lang.String,​? extends java.lang.Object> variables)
      Set variables on a task.