Package org.jbpm.services.task.impl

## Class TaskInstanceServiceImpl

- java.lang.Object
- - org.jbpm.services.task.impl.TaskInstanceServiceImpl

- All Implemented Interfaces:
    `org.kie.api.runtime.CommandExecutor`, `org.kie.internal.task.api.TaskInstanceService`

      public class TaskInstanceServiceImpl
      extends Object
      implements org.kie.internal.task.api.TaskInstanceService

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static Pattern` | `PARAMETER_MATCHER` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TaskInstanceServiceImpl()` |
    `TaskInstanceServiceImpl​(org.kie.internal.task.api.TaskContext context, org.kie.internal.task.api.TaskPersistenceContext persistenceContext, LifeCycleManager lifeCycleManager, TaskEventSupport taskEventSupport, org.kie.api.runtime.Environment environment)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `activate​(long taskId, String userId)` |
    `long` | `addOutputContentFromUser​(long taskId, String userId, Map<String,​Object> params)` |
    `long` | `addTask​(org.kie.api.task.model.Task task, Map<String,​Object> params)` |
    `long` | `addTask​(org.kie.api.task.model.Task task, org.kie.internal.task.api.model.ContentData contentData)` |
    `void` | `claim​(long taskId, String userId)` |
    `void` | `claim​(long taskId, String userId, List<String> groupIds)` |
    `void` | `claimNextAvailable​(String userId)` |
    `void` | `claimNextAvailable​(String userId, List<String> groupIds)` |
    `void` | `complete​(long taskId, String userId, Map<String,​Object> data)` |
    `void` | `delegate​(long taskId, String userId, String targetUserId)` |
    `void` | `deleteFault​(long taskId, String userId)` |
    `void` | `deleteOutput​(long taskId, String userId)` |
    `<T> T` | `execute​(org.kie.api.command.Command<T> command)` |
    `void` | `exit​(long taskId, String userId)` |
    `void` | `fail​(long taskId, String userId, Map<String,​Object> faultData)` |
    `void` | `fireEvent​(org.kie.internal.task.api.model.Operation operation, long taskId)` |
    `void` | `fireEvent​(org.kie.internal.task.api.model.Operation operation, org.kie.api.task.model.Task task)` |
    `void` | `forward​(long taskId, String userId, String targetEntityId)` |
    `org.kie.api.task.model.Content` | `getContentByIdForUser​(long contentId, String userId)` |
    `Map<String,​Object>` | `getContentMapForUser​(Long taskId, String userId)` |
    `List<org.kie.api.task.model.I18NText>` | `getDescriptions​(long taskId)` |
    `Date` | `getExpirationDate​(long taskId)` |
    `int` | `getPriority​(long taskId)` |
    `org.kie.internal.task.api.model.SubTasksStrategy` | `getSubTaskStrategy​(long taskId)` |
    `boolean` | `isSkipable​(long taskId)` |
    `void` | `nominate​(long taskId, String userId, List<org.kie.api.task.model.OrganizationalEntity> potentialOwners)` |
    `void` | `release​(long taskId, String userId)` |
    `void` | `remove​(long taskId, String userId)` |
    `protected Map<String,​Object>` | `resolveTaskDetails​(Map<String,​Object> parameters, org.kie.api.task.model.Task task)` |
    `protected void` | `resolveTaskDetailsForTaskProperties​(org.kie.api.task.model.Task task)` |
    `void` | `resume​(long taskId, String userId)` |
    `void` | `setDescription​(long taskId, String description)` |
    `void` | `setDescriptions​(long taskId, List<org.kie.api.task.model.I18NText> inputDescriptions)` |
    `void` | `setExpirationDate​(long taskId, Date date)` |
    `void` | `setFault​(long taskId, String userId, org.kie.internal.task.api.model.FaultData fault)` |
    `void` | `setLifeCycleManager​(LifeCycleManager lifeCycleManager)` |
    `void` | `setName​(long taskId, String name)` |
    `void` | `setOutput​(long taskId, String userId, Object outputContentData)` |
    `void` | `setPersistenceContext​(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)` |
    `void` | `setPriority​(long taskId, int priority)` |
    `void` | `setSkipable​(long taskId, boolean skipable)` |
    `void` | `setSubject​(long taskId, String subject)` |
    `void` | `setSubTaskStrategy​(long taskId, org.kie.internal.task.api.model.SubTasksStrategy strategy)` |
    `void` | `setTaskEventSupport​(TaskEventSupport taskEventSupport)` |
    `void` | `setTaskNames​(long taskId, List<org.kie.api.task.model.I18NText> inputTaskNames)` |
    `void` | `skip​(long taskId, String userId)` |
    `void` | `start​(long taskId, String userId)` |
    `void` | `stop​(long taskId, String userId)` |
    `void` | `suspend​(long taskId, String userId)` |
    `void` | `suspend​(long taskId, String userId, Map<String,​Object> parameters)` |
    `protected List<String>` | `toGroups​(List<String> groups)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PARAMETER_MATCHER

          protected static final Pattern PARAMETER_MATCHER

  - ### Constructor Detail

    - #### TaskInstanceServiceImpl

          public TaskInstanceServiceImpl()

    - #### TaskInstanceServiceImpl

          public TaskInstanceServiceImpl​(org.kie.internal.task.api.TaskContext context,
                                         org.kie.internal.task.api.TaskPersistenceContext persistenceContext,
                                         LifeCycleManager lifeCycleManager,
                                         TaskEventSupport taskEventSupport,
                                         org.kie.api.runtime.Environment environment)

  - ### Method Detail

    - #### setLifeCycleManager

          public void setLifeCycleManager​(LifeCycleManager lifeCycleManager)

    - #### setTaskEventSupport

          public void setTaskEventSupport​(TaskEventSupport taskEventSupport)

    - #### setPersistenceContext

          public void setPersistenceContext​(org.kie.internal.task.api.TaskPersistenceContext persistenceContext)

    - #### addTask

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

      Specified by:
        `addTask` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### addTask

          public long addTask​(org.kie.api.task.model.Task task,
                              org.kie.internal.task.api.model.ContentData contentData)

      Specified by:
        `addTask` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### activate

          public void activate​(long taskId,
                               String userId)

      Specified by:
        `activate` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### claim

          public void claim​(long taskId,
                            String userId)

      Specified by:
        `claim` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### claim

          public void claim​(long taskId,
                            String userId,
                            List<String> groupIds)

      Specified by:
        `claim` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### claimNextAvailable

          public void claimNextAvailable​(String userId)

      Specified by:
        `claimNextAvailable` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### claimNextAvailable

          public void claimNextAvailable​(String userId,
                                         List<String> groupIds)

      Specified by:
        `claimNextAvailable` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### complete

          public void complete​(long taskId,
                               String userId,
                               Map<String,​Object> data)

      Specified by:
        `complete` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### delegate

          public void delegate​(long taskId,
                               String userId,
                               String targetUserId)

      Specified by:
        `delegate` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### deleteFault

          public void deleteFault​(long taskId,
                                  String userId)

      Specified by:
        `deleteFault` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### deleteOutput

          public void deleteOutput​(long taskId,
                                   String userId)

      Specified by:
        `deleteOutput` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### exit

          public void exit​(long taskId,
                           String userId)

      Specified by:
        `exit` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### fail

          public void fail​(long taskId,
                           String userId,
                           Map<String,​Object> faultData)

      Specified by:
        `fail` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### forward

          public void forward​(long taskId,
                              String userId,
                              String targetEntityId)

      Specified by:
        `forward` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### release

          public void release​(long taskId,
                              String userId)

      Specified by:
        `release` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### remove

          public void remove​(long taskId,
                             String userId)

      Specified by:
        `remove` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### resume

          public void resume​(long taskId,
                             String userId)

      Specified by:
        `resume` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setFault

          public void setFault​(long taskId,
                               String userId,
                               org.kie.internal.task.api.model.FaultData fault)

      Specified by:
        `setFault` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setOutput

          public void setOutput​(long taskId,
                                String userId,
                                Object outputContentData)

      Specified by:
        `setOutput` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setPriority

          public void setPriority​(long taskId,
                                  int priority)

      Specified by:
        `setPriority` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setTaskNames

          public void setTaskNames​(long taskId,
                                   List<org.kie.api.task.model.I18NText> inputTaskNames)

      Specified by:
        `setTaskNames` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### skip

          public void skip​(long taskId,
                           String userId)

      Specified by:
        `skip` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### start

          public void start​(long taskId,
                            String userId)

      Specified by:
        `start` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### stop

          public void stop​(long taskId,
                           String userId)

      Specified by:
        `stop` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### suspend

          public void suspend​(long taskId,
                              String userId)

      Specified by:
        `suspend` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### suspend

          public void suspend​(long taskId,
                              String userId,
                              Map<String,​Object> parameters)

      Specified by:
        `suspend` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### nominate

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

      Specified by:
        `nominate` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setSubTaskStrategy

          public void setSubTaskStrategy​(long taskId,
                                         org.kie.internal.task.api.model.SubTasksStrategy strategy)

      Specified by:
        `setSubTaskStrategy` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setExpirationDate

          public void setExpirationDate​(long taskId,
                                        Date date)

      Specified by:
        `setExpirationDate` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setDescriptions

          public void setDescriptions​(long taskId,
                                      List<org.kie.api.task.model.I18NText> inputDescriptions)

      Specified by:
        `setDescriptions` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setSkipable

          public void setSkipable​(long taskId,
                                  boolean skipable)

      Specified by:
        `setSkipable` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### getPriority

          public int getPriority​(long taskId)

      Specified by:
        `getPriority` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### getExpirationDate

          public Date getExpirationDate​(long taskId)

      Specified by:
        `getExpirationDate` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### getDescriptions

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

      Specified by:
        `getDescriptions` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### isSkipable

          public boolean isSkipable​(long taskId)

      Specified by:
        `isSkipable` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### getSubTaskStrategy

          public org.kie.internal.task.api.model.SubTasksStrategy getSubTaskStrategy​(long taskId)

      Specified by:
        `getSubTaskStrategy` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### execute

          public <T> T execute​(org.kie.api.command.Command<T> command)

      Specified by:
        `execute` in interface `org.kie.api.runtime.CommandExecutor`

    - #### setName

          public void setName​(long taskId,
                              String name)

      Specified by:
        `setName` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setDescription

          public void setDescription​(long taskId,
                                     String description)

      Specified by:
        `setDescription` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### setSubject

          public void setSubject​(long taskId,
                                 String subject)

      Specified by:
        `setSubject` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### addOutputContentFromUser

          public long addOutputContentFromUser​(long taskId,
                                               String userId,
                                               Map<String,​Object> params)

      Specified by:
        `addOutputContentFromUser` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### getContentByIdForUser

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

      Specified by:
        `getContentByIdForUser` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### getContentMapForUser

          public Map<String,​Object> getContentMapForUser​(Long taskId,
                                                               String userId)

      Specified by:
        `getContentMapForUser` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### toGroups

          protected List<String> toGroups​(List<String> groups)

    - #### resolveTaskDetails

          protected Map<String,​Object> resolveTaskDetails​(Map<String,​Object> parameters,
                                                                org.kie.api.task.model.Task task)

    - #### resolveTaskDetailsForTaskProperties

          protected void resolveTaskDetailsForTaskProperties​(org.kie.api.task.model.Task task)

    - #### fireEvent

          public void fireEvent​(org.kie.internal.task.api.model.Operation operation,
                                long taskId)

      Specified by:
        `fireEvent` in interface `org.kie.internal.task.api.TaskInstanceService`

    - #### fireEvent

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

      Specified by:
        `fireEvent` in interface `org.kie.internal.task.api.TaskInstanceService`