org.kie.api.task

## Interface TaskService

- All Superinterfaces:
    CommandExecutor

      public interface TaskService
      extends CommandExecutor

  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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate(long taskId, String userId)`
    `Long` | `addComment(long taskId, Comment comment)`
    `Long` | `addComment(long taskId, String addedByUserId, String commentText)`
    `long` | `addTask(Task task, Map<String,Object> params)`
    `void` | `claim(long taskId, String userId)`
    `void` | `claimNextAvailable(String userId, String language)`
    `void` | `complete(long taskId, String userId, Map<String,Object> data)`
    `void` | `delegate(long taskId, String userId, String targetUserId)`
    `void` | `deleteComment(long taskId, long commentId)`
    `void` | `exit(long taskId, String userId)`
    `void` | `fail(long taskId, String userId, Map<String,Object> faultData)`
    `void` | `forward(long taskId, String userId, String targetEntityId)`
    `List<Comment>` | `getAllCommentsByTaskId(long taskId)`
    `Attachment` | `getAttachmentById(long attachId)`
    `Comment` | `getCommentById(long commentId)`
    `Content` | `getContentById(long contentId)`
    `Task` | `getTaskById(long taskId)`
    `Task` | `getTaskByWorkItemId(long workItemId)`
    `Map<String,Object>` | `getTaskContent(long taskId)`
    `List<TaskSummary>` | `getTasksAssignedAsBusinessAdministrator(String userId, String language)`
    `List<TaskSummary>` | `getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, String language, int firstResult, int maxResults)` Deprecated.
    `List<TaskSummary>` | `getTasksAssignedAsPotentialOwner(String userId, String language)`
    `List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByProcessId(String userId, String processId)`
    `List<TaskSummary>` | `getTasksAssignedAsPotentialOwnerByStatus(String userId, List<Status> status, String language)`
    `List<Long>` | `getTasksByProcessInstanceId(long processInstanceId)`
    `List<TaskSummary>` | `getTasksByStatusByProcessInstanceId(long processInstanceId, List<Status> status, String language)`
    `List<TaskSummary>` | `getTasksByVariousFields(String userId, List<Long> workItemIds, List<Long> taskIds, List<Long> procInstIds, List<String> busAdmins, List<String> potOwners, List<String> taskOwners, List<Status> status, List<String> language, boolean union)` Deprecated.
    `List<TaskSummary>` | `getTasksByVariousFields(String userId, Map<String,List<?>> parameters, boolean union)` Deprecated.
    `List<TaskSummary>` | `getTasksOwned(String userId, String language)`
    `List<TaskSummary>` | `getTasksOwnedByStatus(String userId, List<Status> status, String language)`
    `void` | `nominate(long taskId, String userId, List<OrganizationalEntity> potentialOwners)`
    `void` | `release(long taskId, String userId)`
    `void` | `resume(long taskId, String userId)`
    `void` | `setExpirationDate(long taskId, Date date)`
    `void` | `skip(long taskId, String userId)`
    `void` | `start(long taskId, String userId)`
    `void` | `stop(long taskId, String userId)`
    `void` | `suspend(long taskId, String userId)`

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

      `execute`

- - ### Method Detail

    - #### activate

          void activate(long taskId,
                      String userId)

    - #### claim

          void claim(long taskId,
                   String userId)

    - #### claimNextAvailable

          void claimNextAvailable(String userId,
                                String language)

    - #### complete

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

    - #### delegate

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

    - #### exit

          void exit(long taskId,
                  String userId)

    - #### fail

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

    - #### forward

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

    - #### getTaskByWorkItemId

          Task getTaskByWorkItemId(long workItemId)

    - #### getTaskById

          Task getTaskById(long taskId)

    - #### getTasksAssignedAsBusinessAdministrator

          List<TaskSummary> getTasksAssignedAsBusinessAdministrator(String userId,
                                                                  String language)

    - #### getTasksAssignedAsPotentialOwner

          List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                           String language)

    - #### getTasksAssignedAsPotentialOwner

          @Deprecated
          List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId,
                                                                      List<String> groupIds,
                                                                      String language,
                                                                      int firstResult,
                                                                      int maxResults)

      Deprecated.

    - #### getTasksAssignedAsPotentialOwnerByStatus

          List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId,
                                                                   List<Status> status,
                                                                   String language)

    - #### getTasksOwned

          List<TaskSummary> getTasksOwned(String userId,
                                        String language)

    - #### getTasksOwnedByStatus

          List<TaskSummary> getTasksOwnedByStatus(String userId,
                                                List<Status> status,
                                                String language)

    - #### getTasksByStatusByProcessInstanceId

          List<TaskSummary> getTasksByStatusByProcessInstanceId(long processInstanceId,
                                                              List<Status> status,
                                                              String language)

    - #### getTasksAssignedAsPotentialOwnerByProcessId

          List<TaskSummary> getTasksAssignedAsPotentialOwnerByProcessId(String userId,
                                                                      String processId)

    - #### getTasksByProcessInstanceId

          List<Long> getTasksByProcessInstanceId(long processInstanceId)

    - #### addTask

          long addTask(Task task,
                     Map<String,Object> params)

    - #### release

          void release(long taskId,
                     String userId)

    - #### resume

          void resume(long taskId,
                    String userId)

    - #### skip

          void skip(long taskId,
                  String userId)

    - #### start

          void start(long taskId,
                   String userId)

    - #### stop

          void stop(long taskId,
                  String userId)

    - #### suspend

          void suspend(long taskId,
                     String userId)

    - #### nominate

          void nominate(long taskId,
                      String userId,
                      List<OrganizationalEntity> potentialOwners)

    - #### getContentById

          Content getContentById(long contentId)

    - #### getAttachmentById

          Attachment getAttachmentById(long attachId)

    - #### getTaskContent

          Map<String,Object> getTaskContent(long taskId)

    - #### getTasksByVariousFields

          @Deprecated
          List<TaskSummary> getTasksByVariousFields(String userId,
                                                             List<Long> workItemIds,
                                                             List<Long> taskIds,
                                                             List<Long> procInstIds,
                                                             List<String> busAdmins,
                                                             List<String> potOwners,
                                                             List<String> taskOwners,
                                                             List<Status> status,
                                                             List<String> language,
                                                             boolean union)

      Deprecated.
      This method will be removed in jBPM 7.x because of new methods that better implement this functionality. This method queries using the given arguments.
      Parameters:
        `userId` - Optional parameter: the task user id
        `workItemIds` - Optional parameter: a list of work item ids
        `taskIds` - Optional parameter: a list of task ids
        `procInstIds` - Optional parameter: a list of task ids
        `busAdmins` - Optional parameter: a list of business administrator ids
        `potOwners` - Optional parameter: a list of potential owners
        `taskOwners` - Optional parameter: a list of task owners
        `status` - Optional parameter: a list of status's
        `union` - Required: whether the query should be a union or intersection of the criteria
      Returns:
        a List of `TaskSummary` instances that fit the critieria given

    - #### getTasksByVariousFields

          @Deprecated
          List<TaskSummary> getTasksByVariousFields(String userId,
                                                             Map<String,List<?>> parameters,
                                                             boolean union)

      Deprecated.
      This method will be removed in jBPM 7.x because of new methods that better implement this functionality. Using this method is not recommended.
      See Also:
        `#getTasksByVariousFields(String, List, List, List, List, List, List, List, boolean)}`

    - #### addComment

          Long addComment(long taskId,
                        Comment comment)

    - #### addComment

          Long addComment(long taskId,
                        String addedByUserId,
                        String commentText)

    - #### deleteComment

          void deleteComment(long taskId,
                           long commentId)

    - #### getAllCommentsByTaskId

          List<Comment> getAllCommentsByTaskId(long taskId)

    - #### getCommentById

          Comment getCommentById(long commentId)

    - #### setExpirationDate

          void setExpirationDate(long taskId,
                               Date date)

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