Package org.kie.internal.task.api

## Interface TaskQueryService

-     public interface TaskQueryService

  The Task Query Service will contain all the methods to get information about the current Task Instances. Most of the times these methods will be used to build User Interfaces, and we should not include any method related with Task Statistics here.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getCompletedTaskByUserId​(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)` |
    `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)` |
    `org.kie.api.task.model.Task` | `getTaskByWorkItemId​(long workItemId)` |
    `org.kie.api.task.model.Task` | `getTaskInstanceById​(long taskId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsBusinessAdministrator​(java.lang.String userId, java.util.List<java.lang.String> groupIds)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsBusinessAdministratorByStatus​(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>` | `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, int firstResult, int maxResults)` |
    `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<java.lang.String> groupIds, java.util.List<org.kie.api.task.model.Status> status, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDate​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> status, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwnerByExpirationDateOptional​(java.lang.String userId, java.util.List<java.lang.String> groupIds, java.util.List<org.kie.api.task.model.Status> status, 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> status, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedAsPotentialOwnerByStatus​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> status)` |
    `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> groupsId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedByGroupsByExpirationDate​(java.util.List<java.lang.String> groupIds, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksAssignedByGroupsByExpirationDateOptional​(java.util.List<java.lang.String> groupIds, java.util.Date expirationDate)` |
    `java.util.List<java.lang.Long>` | `getTasksByProcessInstanceId​(java.lang.String processInstanceId)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksByStatusByProcessInstanceId​(java.lang.String processInstanceId, java.util.List<org.kie.api.task.model.Status> status)` |
    `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.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> status, 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> status, java.util.Date expirationDate)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `getTasksOwnedByStatus​(java.lang.String userId, java.util.List<org.kie.api.task.model.Status> status)` |
    `java.util.List<org.kie.api.task.model.TaskSummary>` | `query​(java.lang.String userId, java.lang.Object queryWhere)` |

- - ### Method Detail

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

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

    - #### getTasksAssignedAsBusinessAdministrator

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

    - #### getTasksAssignedAsBusinessAdministratorByStatus

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

    - #### getTasksAssignedAsExcludedOwner

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

    - #### getTasksAssignedAsPotentialOwnerByExpirationDate

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

    - #### getTasksAssignedAsPotentialOwnerByExpirationDateOptional

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

    - #### getTasksAssignedAsPotentialOwnerByExpirationDate

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedAsPotentialOwnerByExpirationDate​(java.lang.String userId,
                                                                                                              java.util.List<org.kie.api.task.model.Status> status,
                                                                                                              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> status,
                                                                                                                      java.util.Date expirationDate)

    - #### getTasksAssignedAsPotentialOwner

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

    - #### getTasksAssignedAsPotentialOwnerByStatus

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

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

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

    - #### getTasksAssignedByGroupsByExpirationDate

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedByGroupsByExpirationDate​(java.util.List<java.lang.String> groupIds,
                                                                                                      java.util.Date expirationDate)

    - #### getTasksAssignedByGroupsByExpirationDateOptional

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksAssignedByGroupsByExpirationDateOptional​(java.util.List<java.lang.String> groupIds,
                                                                                                              java.util.Date expirationDate)

    - #### getTasksOwned

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

    - #### getTasksOwnedByStatus

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

    - #### getTasksOwnedByExpirationDate

          java.util.List<org.kie.api.task.model.TaskSummary> getTasksOwnedByExpirationDate​(java.lang.String userId,
                                                                                           java.util.List<org.kie.api.task.model.Status> status,
                                                                                           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> status,
                                                                                                   java.util.Date expirationDate)

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

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

    - #### getTasksByStatusByProcessInstanceId

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

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

    - #### getPendingSubTasksByParent

          int getPendingSubTasksByParent​(long parentId)

    - #### getTaskByWorkItemId

          org.kie.api.task.model.Task getTaskByWorkItemId​(long workItemId)

    - #### getTaskInstanceById

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

    - #### getTasksByProcessInstanceId

          java.util.List<java.lang.Long> getTasksByProcessInstanceId​(java.lang.String processInstanceId)

    - #### getPotentialOwnersForTaskIds

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

    - #### getCompletedTaskByUserId

          int getCompletedTaskByUserId​(java.lang.String userId)

    - #### getPendingTaskByUserId

          int getPendingTaskByUserId​(java.lang.String userId)

    - #### query

          java.util.List<org.kie.api.task.model.TaskSummary> query​(java.lang.String userId,
                                                                   java.lang.Object queryWhere)

      Parameters:
        `queryWhere` -
      Returns: