Package org.kie.internal.task.api

## Interface InternalTaskService

- All Superinterfaces:
    `org.kie.api.runtime.CommandExecutor`, `org.kie.api.task.TaskService`

      public interface InternalTaskService
      extends org.kie.api.task.TaskService

  The Task Service Entry Point serves as facade of all the other services, providing a single entry point to access to all the services

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `addAttachment​(long taskId, org.kie.api.task.model.Attachment attachment, org.kie.api.task.model.Content content)` |
    `long` | `addContent​(long taskId, java.util.Map<java.lang.String,​java.lang.Object> params)` |
    `long` | `addContent​(long taskId, org.kie.api.task.model.Content content)` |
    `long` | `addContentFromUser​(long taskId, java.lang.String userId, java.util.Map<java.lang.String,​java.lang.Object> params)` |
    `void` | `addGroup​(org.kie.api.task.model.Group group)` |
    `void` | `addMarshallerContext​(java.lang.String ownerId, ContentMarshallerContext context)` |
    `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, ContentData data)` |
    `void` | `addUser​(org.kie.api.task.model.User user)` |
    `void` | `addUsersAndGroups​(java.util.Map<java.lang.String,​org.kie.api.task.model.User> users, java.util.Map<java.lang.String,​org.kie.api.task.model.Group> groups)` |
    `int` | `archiveTasks​(java.util.List<org.kie.api.task.model.TaskSummary> tasks)` |
    `void` | `deleteAttachment​(long taskId, long attachmentId)` |
    `void` | `deleteContent​(long taskId, long contentId)` |
    `void` | `deleteFault​(long taskId, java.lang.String userId)` |
    `void` | `deleteOutput​(long taskId, java.lang.String userId)` |
    `void` | `deployTaskDef​(TaskDef def)` |
    `void` | `executeReminderForTask​(long taskId, java.lang.String fromUser)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getActiveTasks()` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getActiveTasks​(java.util.Date since)` |
    `java.util.List<org.kie.api.task.model.Attachment>` | `getAllAttachmentsByTaskId​(long taskId)` |
    `java.util.List<org.kie.api.task.model.Content>` | `getAllContentByTaskId​(long taskId)` |
    `java.util.List<TaskDef>` | `getAllTaskDef​(java.lang.String filter)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getArchivedTasks()` |
    `int` | `getCompletedTaskByUserId​(java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getCompletedTasks()` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getCompletedTasks​(java.util.Date since)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getCompletedTasksByProcessId​(java.lang.Long processId)` |
    `org.kie.api.task.model.Content` | `getContentByIdForUser​(long contentId, java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.I18NText>` | `getDescriptions​(long taskId)` |
    `java.util.Date` | `getExpirationDate​(long taskId)` |
    `org.kie.api.task.model.Group` | `getGroupById​(java.lang.String groupId)` |
    `java.util.List<org.kie.api.task.model.Group>` | `getGroups()` |
    `ContentMarshallerContext` | `getMarshallerContext​(org.kie.api.task.model.Task task)` |
    `org.kie.api.task.model.OrganizationalEntity` | `getOrganizationalEntityById​(java.lang.String entityId)` |
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getOutputContentMapForUser​(long taskId, java.lang.String userId)` |
    `int` | `getPendingSubTasksByParent​(long parentId)` |
    `int` | `getPendingTaskByUserId​(java.lang.String userId)` |
    `java.util.Map<java.lang.Long,​java.util.List<org.kie.api.task.model.OrganizationalEntity>>` | `getPotentialOwnersForTaskIds​(java.util.List<java.lang.Long> taskIds)` |
    `int` | `getPriority​(long taskId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getSubTasksAssignedAsPotentialOwner​(long parentId, java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getSubTasksByParent​(long parentId)` |
    `SubTasksStrategy` | `getSubTaskStrategy​(long taskId)` |
    `TaskDef` | `getTaskDefById​(java.lang.String id)` |
    `java.util.List<TaskEvent>` | `getTaskEventsById​(long taskId)` |
    `org.kie.api.task.model.Task` | `getTaskInstanceById​(long taskId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsBusinessAdministratorByStatus​(java.lang.String userId, java.lang.String language, java.util.List<org.kie.api.task.model.Status> statuses)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsExcludedOwner​(java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwner​(java.lang.String userId, java.util.List<java.lang.String> groupIds)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwner​(java.lang.String userId, java.util.List<java.lang.String> groupIds, java.util.List<org.kie.api.task.model.Status> status, QueryFilter filter)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDate​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> statuses, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDateOptional​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> statuses, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwnerByStatusByGroup​(java.lang.String userId, java.util.List<java.lang.String> groupIds, java.util.List<org.kie.api.task.model.Status> status)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsRecipient​(java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsTaskInitiator​(java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsTaskStakeholder​(java.lang.String userId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedByGroup​(java.lang.String groupId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedByGroups​(java.util.List<java.lang.String> groupIds)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksByStatusByProcessInstanceIdByTaskName​(java.lang.String processInstanceId, java.util.List<org.kie.api.task.model.Status> status, java.lang.String taskName)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksOwned​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> status, QueryFilter filter)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksOwnedByExpirationDate​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> statuses, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksOwnedByExpirationDateBeforeSpecifiedDate​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> status, java.util.Date date)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksOwnedByExpirationDateOptional​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> statuses, java.util.Date expirationDate)` |
    `org.kie.api.task.model.User` | `getUserById​(java.lang.String userId)` |
    `UserInfo` | `getUserInfo()` |
    `java.util.List<org.kie.api.task.model.User>` | `getUsers()` |
    `boolean` | `isSkipable​(long taskId)` |
    `void` | `remove​(long taskId, java.lang.String userId)` |
    `int` | `removeAllTasks()` |
    `void` | `removeGroup​(java.lang.String groupId)` |
    `void` | `removeMarshallerContext​(java.lang.String ownerId)` |
    `void` | `removeTaskEventsById​(long taskId)` |
    `int` | `removeTasks​(java.util.List<org.kie.api.task.model.TaskSummary> tasks)` |
    `void` | `removeUser​(java.lang.String userId)` |
    `void` | `setDescriptions​(long taskId, java.util.List<org.kie.api.task.model.I18NText> descriptions)` |
    `long` | `setDocumentContentFromUser​(long taskId, java.lang.String userId, byte[] byteContent)` |
    `void` | `setFault​(long taskId, java.lang.String userId, FaultData fault)` |
    `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` | `setSubTaskStrategy​(long taskId, SubTasksStrategy strategy)` |
    `void` | `setTaskNames​(long taskId, java.util.List<org.kie.api.task.model.I18NText> taskNames)` |
    `void` | `setUserInfo​(UserInfo userInfo)` |
    `TaskSummaryQueryBuilder` | `taskSummaryQuery​(java.lang.String userId)` |
    `void` | `undeployTaskDef​(java.lang.String id)` |

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

      `execute`

    - ### Methods inherited from interface org.kie.api.task.TaskService

      `activate, addComment, addComment, addTask, claim, claimNextAvailable, complete, delegate, deleteComment, exit, fail, forward, getAllCommentsByTaskId, getAttachmentById, getCommentById, getContentById, getTaskById, getTaskByWorkItemId, getTaskContent, getTasksAssignedAsBusinessAdministrator, getTasksAssignedAsPotentialOwner, getTasksAssignedAsPotentialOwner, getTasksAssignedAsPotentialOwnerByProcessId, getTasksAssignedAsPotentialOwnerByStatus, getTasksByProcessInstanceId, getTasksByStatusByProcessInstanceId, getTasksOwned, getTasksOwnedByStatus, nominate, release, resume, setExpirationDate, skip, start, stop, suspend`

- - ### Method Detail

    - #### getTasksOwned

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksOwned​(java.lang.String userId,
                                                                           java.util.List<org.kie.api.task.model.Status> status,
                                                                           QueryFilter filter)

    - #### getTasksAssignedAsPotentialOwner

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwner​(java.lang.String userId,
                                                                                              java.util.List<java.lang.String> groupIds,
                                                                                              java.util.List<org.kie.api.task.model.Status> status,
                                                                                              QueryFilter filter)

    - #### addGroup

          void addGroup​(org.kie.api.task.model.Group group)

    - #### addUser

          void addUser​(org.kie.api.task.model.User user)

    - #### archiveTasks

          int archiveTasks​(java.util.List<org.kie.api.task.model.TaskSummary> tasks)

    - #### deleteFault

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

    - #### deleteOutput

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

    - #### deployTaskDef

          void deployTaskDef​(TaskDef def)

    - #### getActiveTasks

          java.util.List<org.kie.api.task.model.TaskSummary> getActiveTasks()

    - #### getActiveTasks

          java.util.List<org.kie.api.task.model.TaskSummary> getActiveTasks​(java.util.Date since)

    - #### getAllTaskDef

          java.util.List<TaskDef> getAllTaskDef​(java.lang.String filter)

    - #### getArchivedTasks

          java.util.List<org.kie.api.task.model.TaskSummary> getArchivedTasks()

    - #### getCompletedTasks

          java.util.List<org.kie.api.task.model.TaskSummary> getCompletedTasks()

    - #### getCompletedTasks

          java.util.List<org.kie.api.task.model.TaskSummary> getCompletedTasks​(java.util.Date since)

    - #### getCompletedTasksByProcessId

          java.util.List<org.kie.api.task.model.TaskSummary> getCompletedTasksByProcessId​(java.lang.Long processId)

    - #### getGroupById

          org.kie.api.task.model.Group getGroupById​(java.lang.String groupId)

    - #### getGroups

          java.util.List<org.kie.api.task.model.Group> getGroups()

    - #### getSubTasksAssignedAsPotentialOwner

          java.util.List<org.kie.api.task.model.TaskSummary> getSubTasksAssignedAsPotentialOwner​(long parentId,
                                                                                                 java.lang.String userId)

    - #### getSubTasksByParent

          java.util.List<org.kie.api.task.model.TaskSummary> getSubTasksByParent​(long parentId)

    - #### getPendingSubTasksByParent

          int getPendingSubTasksByParent​(long parentId)

    - #### getTaskDefById

          TaskDef getTaskDefById​(java.lang.String id)

    - #### getTasksAssignedAsPotentialOwnerByExpirationDate

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDate​(java.lang.String userId,
                                                                                                              java.util.List<org.kie.api.task.model.Status> statuses,
                                                                                                              java.util.Date expirationDate)

    - #### getTasksAssignedAsPotentialOwnerByExpirationDateOptional

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDateOptional​(java.lang.String userId,
                                                                                                                      java.util.List<org.kie.api.task.model.Status> statuses,
                                                                                                                      java.util.Date expirationDate)

    - #### getTasksOwnedByExpirationDate

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksOwnedByExpirationDate​(java.lang.String userId,
                                                                                           java.util.List<org.kie.api.task.model.Status> statuses,
                                                                                           java.util.Date expirationDate)

    - #### getTasksOwnedByExpirationDateOptional

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksOwnedByExpirationDateOptional​(java.lang.String userId,
                                                                                                   java.util.List<org.kie.api.task.model.Status> statuses,
                                                                                                   java.util.Date expirationDate)

    - #### getTasksAssignedAsExcludedOwner

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsExcludedOwner​(java.lang.String userId)

    - #### getTasksAssignedAsPotentialOwner

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwner​(java.lang.String userId,
                                                                                              java.util.List<java.lang.String> groupIds)

    - #### getTasksAssignedAsPotentialOwnerByStatusByGroup

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwnerByStatusByGroup​(java.lang.String userId,
                                                                                                             java.util.List<java.lang.String> groupIds,
                                                                                                             java.util.List<org.kie.api.task.model.Status> status)

    - #### getTasksAssignedAsRecipient

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsRecipient​(java.lang.String userId)

    - #### getTasksAssignedAsTaskInitiator

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsTaskInitiator​(java.lang.String userId)

    - #### getTasksAssignedAsTaskStakeholder

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsTaskStakeholder​(java.lang.String userId)

    - #### getTasksOwnedByExpirationDateBeforeSpecifiedDate

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksOwnedByExpirationDateBeforeSpecifiedDate​(java.lang.String userId,
                                                                                                              java.util.List<org.kie.api.task.model.Status> status,
                                                                                                              java.util.Date date)

    - #### getTasksByStatusByProcessInstanceIdByTaskName

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksByStatusByProcessInstanceIdByTaskName​(java.lang.String processInstanceId,
                                                                                                           java.util.List<org.kie.api.task.model.Status> status,
                                                                                                           java.lang.String taskName)

    - #### getPotentialOwnersForTaskIds

          java.util.Map<java.lang.Long,​java.util.List<org.kie.api.task.model.OrganizationalEntity>> getPotentialOwnersForTaskIds​(java.util.List<java.lang.Long> taskIds)

    - #### getUserById

          org.kie.api.task.model.User getUserById​(java.lang.String userId)

    - #### getUsers

          java.util.List<org.kie.api.task.model.User> getUsers()

    - #### addTask

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

    - #### remove

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

    - #### removeGroup

          void removeGroup​(java.lang.String groupId)

    - #### removeTasks

          int removeTasks​(java.util.List<org.kie.api.task.model.TaskSummary> tasks)

    - #### removeUser

          void removeUser​(java.lang.String userId)

    - #### setFault

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

    - #### setOutput

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

    - #### setPriority

          void setPriority​(long taskId,
                           int priority)

    - #### setTaskNames

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

    - #### undeployTaskDef

          void undeployTaskDef​(java.lang.String id)

    - #### getTaskEventsById

          java.util.List<TaskEvent> getTaskEventsById​(long taskId)

    - #### getUserInfo

          UserInfo getUserInfo()

    - #### setUserInfo

          void setUserInfo​(UserInfo userInfo)

    - #### addUsersAndGroups

          void addUsersAndGroups​(java.util.Map<java.lang.String,​org.kie.api.task.model.User> users,
                                 java.util.Map<java.lang.String,​org.kie.api.task.model.Group> groups)

    - #### removeAllTasks

          int removeAllTasks()

    - #### addContent

          long addContent​(long taskId,
                          org.kie.api.task.model.Content content)

    - #### setDocumentContentFromUser

          long setDocumentContentFromUser​(long taskId,
                                          java.lang.String userId,
                                          byte[] byteContent)

    - #### addContent

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

    - #### 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)

    - #### getOutputContentMapForUser

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

    - #### deleteContent

          void deleteContent​(long taskId,
                             long contentId)

    - #### getAllContentByTaskId

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

    - #### addAttachment

          long addAttachment​(long taskId,
                             org.kie.api.task.model.Attachment attachment,
                             org.kie.api.task.model.Content content)

    - #### deleteAttachment

          void deleteAttachment​(long taskId,
                                long attachmentId)

    - #### getAllAttachmentsByTaskId

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

    - #### removeTaskEventsById

          void removeTaskEventsById​(long taskId)

    - #### getOrganizationalEntityById

          org.kie.api.task.model.OrganizationalEntity getOrganizationalEntityById​(java.lang.String entityId)

    - #### 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)

    - #### getTaskInstanceById

          org.kie.api.task.model.Task getTaskInstanceById​(long taskId)

    - #### getCompletedTaskByUserId

          int getCompletedTaskByUserId​(java.lang.String userId)

    - #### getPendingTaskByUserId

          int getPendingTaskByUserId​(java.lang.String userId)

    - #### getTasksAssignedByGroup

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedByGroup​(java.lang.String groupId)

    - #### getTasksAssignedByGroups

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedByGroups​(java.util.List<java.lang.String> groupIds)

    - #### addMarshallerContext

          void addMarshallerContext​(java.lang.String ownerId,
                                    ContentMarshallerContext context)

    - #### removeMarshallerContext

          void removeMarshallerContext​(java.lang.String ownerId)

    - #### getMarshallerContext

          ContentMarshallerContext getMarshallerContext​(org.kie.api.task.model.Task task)

    - #### taskSummaryQuery

          TaskSummaryQueryBuilder taskSummaryQuery​(java.lang.String userId)

    - #### getTasksAssignedAsBusinessAdministratorByStatus

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsBusinessAdministratorByStatus​(java.lang.String userId,
                                                                                                             java.lang.String language,
                                                                                                             java.util.List<org.kie.api.task.model.Status> statuses)

    - #### executeReminderForTask

          void executeReminderForTask​(long taskId,
                                      java.lang.String fromUser)

    - #### addContentFromUser

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