org.jbpm.services.api

## Interface UserTaskService

- All Known Subinterfaces:
    UserTaskServiceEJBLocal, UserTaskServiceEJBRemote
  All Known Implementing Classes:
    UserTaskServiceCDIImpl, UserTaskServiceEJBImpl, UserTaskServiceImpl

      public interface UserTaskService

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate(Long taskId, String userId)` Activate the task, i.e. set the task to status Ready.
    `void` | `activate(String deploymentId, Long taskId, String userId)` Activate the task, i.e. set the task to status Ready.
    `Long` | `addAttachment(Long taskId, String userId, String name, Object attachment)` Add attachment to a task
    `Long` | `addAttachment(String deploymentId, Long taskId, String userId, String name, Object attachment)` Add attachment to a task
    `Long` | `addComment(Long taskId, String text, String addedBy, Date addedOn)` Add comment to a task
    `Long` | `addComment(String deploymentId, Long taskId, String text, String addedBy, Date addedOn)` Add comment to a task
    `void` | `claim(Long taskId, String userId)` Claim responsibility for a task, i.e. set the task to status Reserved
    `void` | `claim(String deploymentId, Long taskId, String userId)` Claim responsibility for a task, i.e. set the task to status Reserved
    `void` | `complete(Long taskId, String userId, Map<String,Object> params)` Complete a task with the given data
    `void` | `complete(String deploymentId, Long taskId, String userId, Map<String,Object> params)` Complete a task with the given data
    `void` | `completeAutoProgress(Long taskId, String userId, Map<String,Object> params)` Complete a task with the given data.
    `void` | `completeAutoProgress(String deploymentId, Long taskId, String userId, Map<String,Object> params)` Complete a task with the given data.
    `void` | `delegate(Long taskId, String userId, String targetUserId)` Delegate a task from userId to targetUserId
    `void` | `delegate(String deploymentId, Long taskId, String userId, String targetUserId)` Delegate a task from userId to targetUserId
    `void` | `deleteAttachment(Long taskId, Long attachmentId)` Delete attachment from a task
    `void` | `deleteAttachment(String deploymentId, Long taskId, Long attachmentId)` Delete attachment from a task
    `void` | `deleteComment(Long taskId, Long commentId)` Deletes comment from a task
    `void` | `deleteComment(String deploymentId, Long taskId, Long commentId)` Deletes comment from a task
    `void` | `deleteContent(Long taskId, Long contentId)` Deletes content given by `contentId` from given task
    `void` | `deleteContent(String deploymentId, Long taskId, Long contentId)` Deletes content given by `contentId` from given task
    `<T> T` | `execute(String deploymentId, org.kie.api.command.Command<T> command)` Executes provided command on the underlying command executor
    `<T> T` | `execute(String deploymentId, org.kie.api.runtime.manager.Context<?> context, org.kie.api.command.Command<T> command)` Executes provided command on the underlying command executor
    `void` | `exit(Long taskId, String userId)` Requesting application is no longer interested in the task output
    `void` | `exit(String deploymentId, Long taskId, String userId)` Requesting application is no longer interested in the task output
    `void` | `fail(Long taskId, String userId, Map<String,Object> faultData)` Actual owner completes the execution of the task raising a fault.
    `void` | `fail(String deploymentId, Long taskId, String userId, Map<String,Object> faultData)` Actual owner completes the execution of the task raising a fault.
    `void` | `forward(Long taskId, String userId, String targetEntityId)` Forward the task to another organization entity.
    `void` | `forward(String deploymentId, Long taskId, String userId, String targetEntityId)` Forward the task to another organization entity.
    `org.kie.api.task.model.Attachment` | `getAttachmentById(Long taskId, Long attachmentId)` Get attachment by identifier
    `org.kie.api.task.model.Attachment` | `getAttachmentById(String deploymentId, Long taskId, Long attachmentId)` Get attachment by identifier
    `Object` | `getAttachmentContentById(Long taskId, Long attachmentId)` Get attachment's content by identifier
    `Object` | `getAttachmentContentById(String deploymentId, Long taskId, Long attachmentId)` Get attachment's content by identifier
    `List<org.kie.api.task.model.Attachment>` | `getAttachmentsByTaskId(Long taskId)` Get attachments for a task
    `List<org.kie.api.task.model.Attachment>` | `getAttachmentsByTaskId(String deploymentId, Long taskId)` Get attachments for a task
    `org.kie.api.task.model.Comment` | `getCommentById(Long taskId, Long commentId)` Get comment by identifier
    `org.kie.api.task.model.Comment` | `getCommentById(String deploymentId, Long taskId, Long commentId)` Get comment by identifier
    `List<org.kie.api.task.model.Comment>` | `getCommentsByTaskId(Long taskId)` Get comments for a task
    `List<org.kie.api.task.model.Comment>` | `getCommentsByTaskId(String deploymentId, Long taskId)` Get comments for a task
    `org.kie.api.task.model.Task` | `getTask(Long taskId)` Returns task instance
    `org.kie.api.task.model.Task` | `getTask(String deploymentId, Long taskId)` Returns task instance
    `Map<String,Object>` | `getTaskInputContentByTaskId(Long taskId)` Returns task input data of a task
    `Map<String,Object>` | `getTaskInputContentByTaskId(String deploymentId, Long taskId)` Returns task input data of a task
    `Map<String,Object>` | `getTaskOutputContentByTaskId(Long taskId)` Returns task output data currently stored, might be null of no data is stored
    `Map<String,Object>` | `getTaskOutputContentByTaskId(String deploymentId, Long taskId)` Returns task output data currently stored, might be null of no data is stored
    `void` | `nominate(Long taskId, String userId, List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)` Nominate a task to be handled by potentialOwners
    `void` | `nominate(String deploymentId, Long taskId, String userId, List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)` Nominate a task to be handled by potentialOwners
    `void` | `release(Long taskId, String userId)` Release a previously claimed task
    `void` | `release(String deploymentId, Long taskId, String userId)` Release a previously claimed task
    `void` | `resume(Long taskId, String userId)` Resume a previously suspended task
    `void` | `resume(String deploymentId, Long taskId, String userId)` Resume a previously suspended task
    `Long` | `saveContent(Long taskId, Map<String,Object> values)` Saves gives values as content of a task, applies to task output as input cannot be altered
    `Long` | `saveContent(String deploymentId, Long taskId, Map<String,Object> values)` Saves gives values as content of a task, applies to task output as input cannot be altered
    `void` | `setDescription(Long taskId, String description)` Sets description of the task
    `void` | `setDescription(String deploymentId, Long taskId, String description)` Sets description of the task
    `void` | `setExpirationDate(Long taskId, Date date)` Sets expiration date of a task to given value
    `void` | `setExpirationDate(String deploymentId, Long taskId, Date date)` Sets expiration date of a task to given value
    `void` | `setName(Long taskId, String name)` Sets name of the task
    `void` | `setName(String deploymentId, Long taskId, String name)` Sets name of the task
    `void` | `setPriority(Long taskId, int priority)` Sets priority of a task to given value
    `void` | `setPriority(String deploymentId, Long taskId, int priority)` Sets priority of a task to given value
    `void` | `setSkipable(Long taskId, boolean skipable)` Sets skipable property of a task to given value
    `void` | `setSkipable(String deploymentId, Long taskId, boolean skipable)` Sets skipable property of a task to given value
    `void` | `skip(Long taskId, String userId)` Skip a claimed task
    `void` | `skip(String deploymentId, Long taskId, String userId)` Skip a claimed task
    `void` | `start(Long taskId, String userId)` Start the execution of the task, i.e. set the task to status InProgress.
    `void` | `start(String deploymentId, Long taskId, String userId)` Start the execution of the task, i.e. set the task to status InProgress.
    `void` | `stop(Long taskId, String userId)` Cancel/stop the processing of the task.
    `void` | `stop(String deploymentId, Long taskId, String userId)` Cancel/stop the processing of the task.
    `void` | `suspend(Long taskId, String userId)` Suspend a claimed task.
    `void` | `suspend(String deploymentId, Long taskId, String userId)` Suspend a claimed task.
    `void` | `updateTask(Long taskId, String userId, UserTaskInstanceDesc userTask, Map<String,Object> inputData, Map<String,Object> outputData)` Updates user task properties and data inputs and outputs.
    `void` | `updateTask(String deploymentId, Long taskId, String userId, UserTaskInstanceDesc userTask, Map<String,Object> inputData, Map<String,Object> outputData)` Updates user task properties and data inputs and outputs.

- - ### Method Detail

    - #### activate

          void activate(Long taskId,
                        String userId)

      Activate the task, i.e. set the task to status Ready.
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### activate

          void activate(String deploymentId,
                        Long taskId,
                        String userId)

      Activate the task, i.e. set the task to status Ready.
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### claim

          void claim(Long taskId,
                     String userId)

      Claim responsibility for a task, i.e. set the task to status Reserved
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### claim

          void claim(String deploymentId,
                     Long taskId,
                     String userId)

      Claim responsibility for a task, i.e. set the task to status Reserved
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### complete

          void complete(Long taskId,
                        String userId,
                        Map<String,Object> params)

      Complete a task with the given data
      Parameters:
        `taskId` -
        `userId` -
        `params` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### complete

          void complete(String deploymentId,
                        Long taskId,
                        String userId,
                        Map<String,Object> params)

      Complete a task with the given data
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
        `params` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### completeAutoProgress

          void completeAutoProgress(Long taskId,
                                    String userId,
                                    Map<String,Object> params)

      Complete a task with the given data. If needed, the task is automatically claimed and/or started.
      Parameters:
        `taskId` -
        `userId` -
        `params` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### completeAutoProgress

          void completeAutoProgress(String deploymentId,
                                    Long taskId,
                                    String userId,
                                    Map<String,Object> params)

      Complete a task with the given data. If needed, the task is automatically claimed and/or started.
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
        `params` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### delegate

          void delegate(Long taskId,
                        String userId,
                        String targetUserId)

      Delegate a task from userId to targetUserId
      Parameters:
        `taskId` -
        `userId` -
        `targetUserId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### delegate

          void delegate(String deploymentId,
                        Long taskId,
                        String userId,
                        String targetUserId)

      Delegate a task from userId to targetUserId
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
        `targetUserId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### exit

          void exit(Long taskId,
                    String userId)

      Requesting application is no longer interested in the task output
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### exit

          void exit(String deploymentId,
                    Long taskId,
                    String userId)

      Requesting application is no longer interested in the task output
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### fail

          void fail(Long taskId,
                    String userId,
                    Map<String,Object> faultData)

      Actual owner completes the execution of the task raising a fault. The fault illegalOperationFault is returned if the task interface defines no faults. If fault name or fault data is not set the operation returns illegalArgumentFault.
      Parameters:
        `taskId` -
        `userId` -
        `faultData` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### fail

          void fail(String deploymentId,
                    Long taskId,
                    String userId,
                    Map<String,Object> faultData)

      Actual owner completes the execution of the task raising a fault. The fault illegalOperationFault is returned if the task interface defines no faults. If fault name or fault data is not set the operation returns illegalArgumentFault.
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
        `faultData` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### forward

          void forward(Long taskId,
                       String userId,
                       String targetEntityId)

      Forward the task to another organization entity. The caller has to specify the receiving organizational entity. Potential owners can only forward a task while the task is in the Ready state. For details on forwarding human tasks refer to section 4.7.3 in WS-HumanTask_v1.pdf
      Parameters:
        `taskId` -
        `userId` -
        `targetEntityId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### forward

          void forward(String deploymentId,
                       Long taskId,
                       String userId,
                       String targetEntityId)

      Forward the task to another organization entity. The caller has to specify the receiving organizational entity. Potential owners can only forward a task while the task is in the Ready state. For details on forwarding human tasks refer to section 4.7.3 in WS-HumanTask_v1.pdf
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
        `targetEntityId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### release

          void release(Long taskId,
                       String userId)

      Release a previously claimed task
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### release

          void release(String deploymentId,
                       Long taskId,
                       String userId)

      Release a previously claimed task
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### resume

          void resume(Long taskId,
                      String userId)

      Resume a previously suspended task
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### resume

          void resume(String deploymentId,
                      Long taskId,
                      String userId)

      Resume a previously suspended task
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### skip

          void skip(Long taskId,
                    String userId)

      Skip a claimed task
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### skip

          void skip(String deploymentId,
                    Long taskId,
                    String userId)

      Skip a claimed task
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### start

          void start(Long taskId,
                     String userId)

      Start the execution of the task, i.e. set the task to status InProgress.
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### start

          void start(String deploymentId,
                     Long taskId,
                     String userId)

      Start the execution of the task, i.e. set the task to status InProgress.
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### stop

          void stop(Long taskId,
                    String userId)

      Cancel/stop the processing of the task. The task returns to the Reserved state.
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### stop

          void stop(String deploymentId,
                    Long taskId,
                    String userId)

      Cancel/stop the processing of the task. The task returns to the Reserved state.
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### suspend

          void suspend(Long taskId,
                       String userId)

      Suspend a claimed task.
      Parameters:
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### suspend

          void suspend(String deploymentId,
                       Long taskId,
                       String userId)

      Suspend a claimed task.
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### nominate

          void nominate(Long taskId,
                        String userId,
                        List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)

      Nominate a task to be handled by potentialOwners
      Parameters:
        `taskId` -
        `userId` -
        `potentialOwners` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### nominate

          void nominate(String deploymentId,
                        Long taskId,
                        String userId,
                        List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)

      Nominate a task to be handled by potentialOwners
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
        `potentialOwners` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### setPriority

          void setPriority(Long taskId,
                           int priority)

      Sets priority of a task to given value
      Parameters:
        `taskId` -
        `priority` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### setPriority

          void setPriority(String deploymentId,
                           Long taskId,
                           int priority)

      Sets priority of a task to given value
      Parameters:
        `deploymentId` -
        `taskId` -
        `priority` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### setExpirationDate

          void setExpirationDate(Long taskId,
                                 Date date)

      Sets expiration date of a task to given value
      Parameters:
        `taskId` -
        `date` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### setExpirationDate

          void setExpirationDate(String deploymentId,
                                 Long taskId,
                                 Date date)

      Sets expiration date of a task to given value
      Parameters:
        `deploymentId` -
        `taskId` -
        `date` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### setSkipable

          void setSkipable(Long taskId,
                           boolean skipable)

      Sets skipable property of a task to given value
      Parameters:
        `taskId` -
        `skipable` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### setSkipable

          void setSkipable(String deploymentId,
                           Long taskId,
                           boolean skipable)

      Sets skipable property of a task to given value
      Parameters:
        `deploymentId` -
        `taskId` -
        `skipable` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### setName

          void setName(Long taskId,
                       String name)

      Sets name of the task
      Parameters:
        `taskId` -
        `name` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### setName

          void setName(String deploymentId,
                       Long taskId,
                       String name)

      Sets name of the task
      Parameters:
        `deploymentId` -
        `taskId` -
        `name` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### setDescription

          void setDescription(Long taskId,
                              String description)

      Sets description of the task
      Parameters:
        `taskId` -
        `description` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### setDescription

          void setDescription(String deploymentId,
                              Long taskId,
                              String description)

      Sets description of the task
      Parameters:
        `deploymentId` -
        `taskId` -
        `description` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### updateTask

          void updateTask(Long taskId,
                          String userId,
                          UserTaskInstanceDesc userTask,
                          Map<String,Object> inputData,
                          Map<String,Object> outputData)

      Updates user task properties and data inputs and outputs. Allowed properties to be updated are:
      - name
      - description
      - priority
      - expiration date
      - formName
      Parameters:
        `userId` - user id who is going to perform the update
        `userTask` - user task with properties to be updated
        `inputData` - map of input variables to be added/replaced on a task
        `outputData` - map of output variables to be added/replaced on a task
      Throws:
        `TaskNotFoundException` - in case task id was not given or task was not found with given id

    - #### updateTask

          void updateTask(String deploymentId,
                          Long taskId,
                          String userId,
                          UserTaskInstanceDesc userTask,
                          Map<String,Object> inputData,
                          Map<String,Object> outputData)

      Updates user task properties and data inputs and outputs. Allowed properties to be updated are:
      - name
      - description
      - priority
      - expiration date
      - formName
      Parameters:
        `deploymentId` -
        `userId` - user id who is going to perform the update
        `userTask` - user task with properties to be updated
        `inputData` - map of input variables to be added/replaced on a task
        `outputData` - map of output variables to be added/replaced on a task
      Throws:
        `TaskNotFoundException` - in case task id was not given or task was not found with given id or is not associated with given deployment id

    - #### saveContent

          Long saveContent(Long taskId,
                           Map<String,Object> values)

      Saves gives values as content of a task, applies to task output as input cannot be altered
      Parameters:
        `taskId` -
        `values` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### saveContent

          Long saveContent(String deploymentId,
                           Long taskId,
                           Map<String,Object> values)

      Saves gives values as content of a task, applies to task output as input cannot be altered
      Parameters:
        `deploymentId` -
        `taskId` -
        `values` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getTaskOutputContentByTaskId

          Map<String,Object> getTaskOutputContentByTaskId(Long taskId)

      Returns task output data currently stored, might be null of no data is stored
      Parameters:
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getTaskOutputContentByTaskId

          Map<String,Object> getTaskOutputContentByTaskId(String deploymentId,
                                                          Long taskId)

      Returns task output data currently stored, might be null of no data is stored
      Parameters:
        `deploymentId` -
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getTaskInputContentByTaskId

          Map<String,Object> getTaskInputContentByTaskId(Long taskId)

      Returns task input data of a task
      Parameters:
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getTaskInputContentByTaskId

          Map<String,Object> getTaskInputContentByTaskId(String deploymentId,
                                                         Long taskId)

      Returns task input data of a task
      Parameters:
        `deploymentId` -
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### deleteContent

          void deleteContent(Long taskId,
                             Long contentId)

      Deletes content given by `contentId` from given task
      Parameters:
        `taskId` -
        `contentId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### deleteContent

          void deleteContent(String deploymentId,
                             Long taskId,
                             Long contentId)

      Deletes content given by `contentId` from given task
      Parameters:
        `deploymentId` -
        `taskId` -
        `contentId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### addComment

          Long addComment(Long taskId,
                          String text,
                          String addedBy,
                          Date addedOn)

      Add comment to a task
      Parameters:
        `taskId` -
        `text` -
        `addedBy` -
        `addedOn` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### addComment

          Long addComment(String deploymentId,
                          Long taskId,
                          String text,
                          String addedBy,
                          Date addedOn)

      Add comment to a task
      Parameters:
        `deploymentId` -
        `taskId` -
        `text` -
        `addedBy` -
        `addedOn` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### deleteComment

          void deleteComment(Long taskId,
                             Long commentId)

      Deletes comment from a task
      Parameters:
        `taskId` -
        `commentId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### deleteComment

          void deleteComment(String deploymentId,
                             Long taskId,
                             Long commentId)

      Deletes comment from a task
      Parameters:
        `deploymentId` -
        `taskId` -
        `commentId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getCommentsByTaskId

          List<org.kie.api.task.model.Comment> getCommentsByTaskId(Long taskId)

      Get comments for a task
      Parameters:
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getCommentsByTaskId

          List<org.kie.api.task.model.Comment> getCommentsByTaskId(String deploymentId,
                                                                   Long taskId)

      Get comments for a task
      Parameters:
        `deploymentId` -
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getCommentById

          org.kie.api.task.model.Comment getCommentById(Long taskId,
                                                        Long commentId)

      Get comment by identifier
      Parameters:
        `commentId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getCommentById

          org.kie.api.task.model.Comment getCommentById(String deploymentId,
                                                        Long taskId,
                                                        Long commentId)

      Get comment by identifier
      Parameters:
        `deploymentId` -
        `commentId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### addAttachment

          Long addAttachment(Long taskId,
                             String userId,
                             String name,
                             Object attachment)

      Add attachment to a task
      Parameters:
        `taskId` -
        `userId` -
        `attachment` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### addAttachment

          Long addAttachment(String deploymentId,
                             Long taskId,
                             String userId,
                             String name,
                             Object attachment)

      Add attachment to a task
      Parameters:
        `deploymentId` -
        `taskId` -
        `userId` -
        `attachment` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### deleteAttachment

          void deleteAttachment(Long taskId,
                                Long attachmentId)

      Delete attachment from a task
      Parameters:
        `taskId` -
        `attachmentId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### deleteAttachment

          void deleteAttachment(String deploymentId,
                                Long taskId,
                                Long attachmentId)

      Delete attachment from a task
      Parameters:
        `deploymentId` -
        `taskId` -
        `attachmentId` -
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getAttachmentById

          org.kie.api.task.model.Attachment getAttachmentById(Long taskId,
                                                              Long attachmentId)

      Get attachment by identifier
      Parameters:
        `attachmentId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getAttachmentById

          org.kie.api.task.model.Attachment getAttachmentById(String deploymentId,
                                                              Long taskId,
                                                              Long attachmentId)

      Get attachment by identifier
      Parameters:
        `deploymentId` -
        `attachmentId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getAttachmentContentById

          Object getAttachmentContentById(Long taskId,
                                          Long attachmentId)

      Get attachment's content by identifier
      Parameters:
        `attachmentId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getAttachmentContentById

          Object getAttachmentContentById(String deploymentId,
                                          Long taskId,
                                          Long attachmentId)

      Get attachment's content by identifier
      Parameters:
        `deploymentId` -
        `attachmentId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getAttachmentsByTaskId

          List<org.kie.api.task.model.Attachment> getAttachmentsByTaskId(Long taskId)

      Get attachments for a task
      Parameters:
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getAttachmentsByTaskId

          List<org.kie.api.task.model.Attachment> getAttachmentsByTaskId(String deploymentId,
                                                                         Long taskId)

      Get attachments for a task
      Parameters:
        `deploymentId` -
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### getTask

          org.kie.api.task.model.Task getTask(Long taskId)

      Returns task instance
      Parameters:
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found

    - #### getTask

          org.kie.api.task.model.Task getTask(String deploymentId,
                                              Long taskId)

      Returns task instance
      Parameters:
        `deploymentId` -
        `taskId` -
      Returns:
      Throws:
        `TaskNotFoundException` - in case task with given id was not found or is not associated with given deployment id

    - #### execute

          <T> T execute(String deploymentId,
                        org.kie.api.command.Command<T> command)

      Executes provided command on the underlying command executor
      Parameters:
        `deploymentId` - identifier of the deployment that engine should be used for execution
        `command` - actual command for execution
      Returns:
        results of command execution

    - #### execute

          <T> T execute(String deploymentId,
                        org.kie.api.runtime.manager.Context<?> context,
                        org.kie.api.command.Command<T> command)

      Executes provided command on the underlying command executor
      Parameters:
        `deploymentId` - identifier of the deployment that engine should be used for execution
        `context` - context implementation to be used for getting runtime engine
        `command` - actual command for execution
      Returns:
        results of command execution

Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.