Package org.kie.internal.task.api

## Interface TaskInstanceService

- All Superinterfaces:
    `org.kie.api.runtime.CommandExecutor`

      public interface TaskInstanceService
      extends org.kie.api.runtime.CommandExecutor

  The Task Instance Service is in charge of handling all the actions required to interact with a Task Instance. All the operations described in the WS-HT specification related with the Task Lifecycle are implemented here.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `activate​(long taskId, java.lang.String userId)` |
    `long` | `addOutputContentFromUser​(long taskId, java.lang.String userId, java.util.Map<java.lang.String,​java.lang.Object> params)` |
    `long` | `addTask​(org.kie.api.task.model.Task task, java.util.Map<java.lang.String,​java.lang.Object> params)` |
    `long` | `addTask​(org.kie.api.task.model.Task task, ContentData data)` |
    `void` | `claim​(long taskId, java.lang.String userId)` |
    `void` | `claim​(long taskId, java.lang.String userId, java.util.List<java.lang.String> groupIds)` |
    `void` | `claimNextAvailable​(java.lang.String userId)` |
    `void` | `claimNextAvailable​(java.lang.String userId, java.util.List<java.lang.String> groupIds)` |
    `void` | `complete​(long taskId, java.lang.String userId, java.util.Map<java.lang.String,​java.lang.Object> data)` |
    `void` | `delegate​(long taskId, java.lang.String userId, java.lang.String targetUserId)` |
    `void` | `deleteFault​(long taskId, java.lang.String userId)` |
    `void` | `deleteOutput​(long taskId, java.lang.String userId)` |
    `void` | `exit​(long taskId, java.lang.String userId)` |
    `void` | `fail​(long taskId, java.lang.String userId, java.util.Map<java.lang.String,​java.lang.Object> faultData)` |
    `default void` | `fireEvent​(Operation operation, long taskId)` |
    `default void` | `fireEvent​(Operation operation, org.kie.api.task.model.Task task)` |
    `void` | `forward​(long taskId, java.lang.String userId, java.lang.String targetEntityId)` |
    `org.kie.api.task.model.Content` | `getContentByIdForUser​(long contentId, java.lang.String userId)` |
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getContentMapForUser​(java.lang.Long taskId, java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.I18NText>` | `getDescriptions​(long taskId)` |
    `java.util.Date` | `getExpirationDate​(long taskId)` |
    `int` | `getPriority​(long taskId)` |
    `SubTasksStrategy` | `getSubTaskStrategy​(long taskId)` |
    `boolean` | `isSkipable​(long taskId)` |
    `void` | `nominate​(long taskId, java.lang.String userId, java.util.List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)` |
    `void` | `release​(long taskId, java.lang.String userId)` |
    `void` | `remove​(long taskId, java.lang.String userId)` |
    `void` | `resume​(long taskId, java.lang.String userId)` |
    `void` | `setDescription​(long taskId, java.lang.String description)` |
    `void` | `setDescriptions​(long taskId, java.util.List<org.kie.api.task.model.I18NText> descriptions)` |
    `void` | `setExpirationDate​(long taskId, java.util.Date date)` |
    `void` | `setFault​(long taskId, java.lang.String userId, FaultData fault)` |
    `void` | `setName​(long taskId, java.lang.String name)` |
    `void` | `setOutput​(long taskId, java.lang.String userId, java.lang.Object outputContentData)` |
    `void` | `setPriority​(long taskId, int priority)` |
    `void` | `setSkipable​(long taskId, boolean skipable)` |
    `void` | `setSubject​(long taskId, java.lang.String subject)` |
    `void` | `setSubTaskStrategy​(long taskId, SubTasksStrategy strategy)` |
    `void` | `setTaskNames​(long taskId, java.util.List<org.kie.api.task.model.I18NText> taskNames)` |
    `void` | `skip​(long taskId, java.lang.String userId)` |
    `void` | `start​(long taskId, java.lang.String userId)` |
    `void` | `stop​(long taskId, java.lang.String userId)` |
    `void` | `suspend​(long taskId, java.lang.String userId)` |

    - ### Methods inherited from interface org.kie.api.runtime.CommandExecutor

      `execute`

- - ### Method Detail

    - #### fireEvent

          default void fireEvent​(Operation operation,
                                 long taskId)

    - #### fireEvent

          default void fireEvent​(Operation operation,
                                 org.kie.api.task.model.Task task)

    - #### addTask

          long addTask​(org.kie.api.task.model.Task task,
                       java.util.Map<java.lang.String,​java.lang.Object> params)

    - #### addTask

          long addTask​(org.kie.api.task.model.Task task,
                       ContentData data)

    - #### activate

          void activate​(long taskId,
                        java.lang.String userId)

    - #### claim

          void claim​(long taskId,
                     java.lang.String userId)

    - #### claim

          void claim​(long taskId,
                     java.lang.String userId,
                     java.util.List<java.lang.String> groupIds)

    - #### claimNextAvailable

          void claimNextAvailable​(java.lang.String userId)

    - #### claimNextAvailable

          void claimNextAvailable​(java.lang.String userId,
                                  java.util.List<java.lang.String> groupIds)

    - #### complete

          void complete​(long taskId,
                        java.lang.String userId,
                        java.util.Map<java.lang.String,​java.lang.Object> data)

    - #### delegate

          void delegate​(long taskId,
                        java.lang.String userId,
                        java.lang.String targetUserId)

    - #### exit

          void exit​(long taskId,
                    java.lang.String userId)

    - #### fail

          void fail​(long taskId,
                    java.lang.String userId,
                    java.util.Map<java.lang.String,​java.lang.Object> faultData)

    - #### forward

          void forward​(long taskId,
                       java.lang.String userId,
                       java.lang.String targetEntityId)

    - #### release

          void release​(long taskId,
                       java.lang.String userId)

    - #### remove

          void remove​(long taskId,
                      java.lang.String userId)

    - #### resume

          void resume​(long taskId,
                      java.lang.String userId)

    - #### skip

          void skip​(long taskId,
                    java.lang.String userId)

    - #### start

          void start​(long taskId,
                     java.lang.String userId)

    - #### stop

          void stop​(long taskId,
                    java.lang.String userId)

    - #### suspend

          void suspend​(long taskId,
                       java.lang.String userId)

    - #### nominate

          void nominate​(long taskId,
                        java.lang.String userId,
                        java.util.List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)

    - #### setFault

          void setFault​(long taskId,
                        java.lang.String userId,
                        FaultData fault)

    - #### setOutput

          void setOutput​(long taskId,
                         java.lang.String userId,
                         java.lang.Object outputContentData)

    - #### deleteFault

          void deleteFault​(long taskId,
                           java.lang.String userId)

    - #### deleteOutput

          void deleteOutput​(long taskId,
                            java.lang.String userId)

    - #### setPriority

          void setPriority​(long taskId,
                           int priority)

    - #### setTaskNames

          void setTaskNames​(long taskId,
                            java.util.List<org.kie.api.task.model.I18NText> taskNames)

    - #### setExpirationDate

          void setExpirationDate​(long taskId,
                                 java.util.Date date)

    - #### setDescriptions

          void setDescriptions​(long taskId,
                               java.util.List<org.kie.api.task.model.I18NText> descriptions)

    - #### setSkipable

          void setSkipable​(long taskId,
                           boolean skipable)

    - #### setSubTaskStrategy

          void setSubTaskStrategy​(long taskId,
                                  SubTasksStrategy strategy)

    - #### getPriority

          int getPriority​(long taskId)

    - #### getExpirationDate

          java.util.Date getExpirationDate​(long taskId)

    - #### getDescriptions

          java.util.List<org.kie.api.task.model.I18NText> getDescriptions​(long taskId)

    - #### isSkipable

          boolean isSkipable​(long taskId)

    - #### getSubTaskStrategy

          SubTasksStrategy getSubTaskStrategy​(long taskId)

    - #### setName

          void setName​(long taskId,
                       java.lang.String name)

    - #### setDescription

          void setDescription​(long taskId,
                              java.lang.String description)

    - #### setSubject

          void setSubject​(long taskId,
                          java.lang.String subject)

    - #### addOutputContentFromUser

          long addOutputContentFromUser​(long taskId,
                                        java.lang.String userId,
                                        java.util.Map<java.lang.String,​java.lang.Object> params)

    - #### getContentByIdForUser

          org.kie.api.task.model.Content getContentByIdForUser​(long contentId,
                                                               java.lang.String userId)

    - #### getContentMapForUser

          java.util.Map<java.lang.String,​java.lang.Object> getContentMapForUser​(java.lang.Long taskId,
                                                                                      java.lang.String userId)