org.jbpm.services.api.admin

## Interface UserTaskAdminService

- All Known Implementing Classes:
    UserTaskAdminServiceImpl

      public interface UserTaskAdminService

  Provides administrative operations on top of active tasks. All operations should be performed by eligible user - in most of the case business administrator.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acknowledgeError(String... errorId)` Acknowledge given error that it was reviewed and understood
    `void` | `addBusinessAdmins(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new business admin for a given task.
    `void` | `addBusinessAdmins(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new business admin for a given task.
    `void` | `addBusinessAdmins(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new business admin for a given task.
    `void` | `addExcludedOwners(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new excluded owners for a given task.
    `void` | `addExcludedOwners(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new excluded owners for a given task.
    `void` | `addExcludedOwners(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new excluded owners for a given task.
    `void` | `addPotentialOwners(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new potential owners for a given task.
    `void` | `addPotentialOwners(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new potential owners for a given task.
    `void` | `addPotentialOwners(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Adds new potential owners for a given task.
    `void` | `addTaskInput(long taskId, String name, Object value)` Adds new item to task input variables.
    `void` | `addTaskInput(String deploymentId, long taskId, String name, Object value)` Adds new item to task input variables.
    `void` | `addTaskInputs(long taskId, Map<String,Object> data)` Adds new items to task input variables.
    `void` | `addTaskInputs(String deploymentId, long taskId, Map<String,Object> data)` Adds new items to task input variables.
    `org.kie.internal.task.api.model.EmailNotification` | `buildEmailNotification(String subjectStr, List<org.kie.api.task.model.OrganizationalEntity> recipients, String bodyStr, String fromStr, String replyToStr)` Builds email notification based on given parameters that can be used as argument for notifyWhenNotStarted and notifyWhenNotCompleted methods
    `void` | `cancelNotification(long taskId, long notificationId)` Cancels given notification on a task
    `void` | `cancelNotification(String deploymentId, long taskId, long notificationId)` Cancels given notification on a task
    `void` | `cancelReassignment(long taskId, long reassignmentId)` Cancels given reassignment on a task
    `void` | `cancelReassignment(String deploymentId, long taskId, long reassignmentId)` Cancels given reassignment on a task
    `org.kie.internal.runtime.error.ExecutionError` | `getError(String errorId)` Returns execution error identified by given error id
    `List<org.kie.internal.runtime.error.ExecutionError>` | `getErrors(boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)` Returns execution errors that are classified as task type errors
    `List<org.kie.internal.runtime.error.ExecutionError>` | `getErrorsByTaskId(long taskId, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)` Returns execution errors for given task id
    `List<org.kie.internal.runtime.error.ExecutionError>` | `getErrorsByTaskName(String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)` Returns execution errors for given task name
    `List<org.kie.internal.runtime.error.ExecutionError>` | `getErrorsByTaskName(String processId, String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)` Returns execution errors for given task name and process id
    `List<org.kie.internal.runtime.error.ExecutionError>` | `getErrorsByTaskName(String deploymentId, String processId, String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)` Returns execution errors for given task name, process id and deployment id
    `Collection<TaskNotification>` | `getTaskNotifications(long taskId, boolean activeOnly)` Returns task notifications scheduled for given task
    `Collection<TaskNotification>` | `getTaskNotifications(String deploymentId, long taskId, boolean activeOnly)` Returns task notifications scheduled for given task
    `Collection<TaskReassignment>` | `getTaskReassignments(long taskId, boolean activeOnly)` Returns task reassignments scheduled for given task
    `Collection<TaskReassignment>` | `getTaskReassignments(String deploymentId, long taskId, boolean activeOnly)` Returns task reassignments scheduled for given task
    `Long` | `notifyWhenNotCompleted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)` Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.
    `Long` | `notifyWhenNotCompleted(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)` Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.
    `Long` | `notifyWhenNotStarted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)` Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.
    `Long` | `notifyWhenNotStarted(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)` Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.
    `Long` | `reassignWhenNotCompleted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Reassign automatically a task in case it was not completed before time given as timeExpression elapses.
    `Long` | `reassignWhenNotCompleted(String deploymentId, long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Reassign automatically a task in case it was not completed before time given as timeExpression elapses.
    `Long` | `reassignWhenNotStarted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Reassign automatically a task in case it was not started before time given as timeExpression elapses.
    `Long` | `reassignWhenNotStarted(String deploymentId, long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Reassign automatically a task in case it was not started before time given as timeExpression elapses.
    `void` | `removeBusinessAdmins(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing business admin from given task.
    `void` | `removeBusinessAdmins(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing business admin from given task.
    `void` | `removeBusinessAdmins(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing business admin from given task.
    `void` | `removeExcludedOwners(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing excluded owners from given task.
    `void` | `removeExcludedOwners(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing excluded owners from given task.
    `void` | `removeExcludedOwners(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing excluded owners from given task.
    `void` | `removePotentialOwners(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing potential owners from given task.
    `void` | `removePotentialOwners(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing potential owners from given task.
    `void` | `removePotentialOwners(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)` Remove existing potential owners from given task.
    `void` | `removeTaskInputs(long taskId, String... name)` Removes one or more input variables from a task.
    `void` | `removeTaskInputs(String deploymentId, long taskId, String... name)` Removes one or more input variables from a task.
    `void` | `removeTaskOutputs(long taskId, String... name)` Removes one or more output variables from a task.
    `void` | `removeTaskOutputs(String deploymentId, long taskId, String... name)` Removes one or more output variables from a task.

- - ### Method Detail

    - #### addPotentialOwners

          void addPotentialOwners(long taskId,
                                  boolean removeExisting,
                                  org.kie.api.task.model.OrganizationalEntity... orgEntities)
                           throws TaskNotFoundException

      Adds new potential owners for a given task. Can be instructed to remove existing potential owners which means that the task will be released in case it was claimed already. Task must be in active state.
      Parameters:
        `taskId` - unique task id
        `removeExisting` - specifies if existing potential owners should be removed
        `orgEntities` - one or more potential owner to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### addPotentialOwners

          void addPotentialOwners(String deploymentId,
                                  long taskId,
                                  boolean removeExisting,
                                  org.kie.api.task.model.OrganizationalEntity... orgEntities)
                           throws TaskNotFoundException

      Adds new potential owners for a given task. Can be instructed to remove existing potential owners which means that the task will be released in case it was claimed already. Task must be in active state.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `removeExisting` - specifies if existing potential owners should be removed
        `orgEntities` - one or more potential owner to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### addExcludedOwners

          void addExcludedOwners(long taskId,
                                 boolean removeExisting,
                                 org.kie.api.task.model.OrganizationalEntity... orgEntities)
                          throws TaskNotFoundException

      Adds new excluded owners for a given task. Can be instructed to remove existing excluded owners. Task must be in active state.
      Parameters:
        `taskId` - unique task id
        `removeExisting` - specifies if existing excluded owners should be removed
        `orgEntities` - one or more excluded owner to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### addExcludedOwners

          void addExcludedOwners(String deploymentId,
                                 long taskId,
                                 boolean removeExisting,
                                 org.kie.api.task.model.OrganizationalEntity... orgEntities)
                          throws TaskNotFoundException

      Adds new excluded owners for a given task. Can be instructed to remove existing excluded owners. Task must be in active state.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `removeExisting` - specifies if existing excluded owners should be removed
        `orgEntities` - one or more excluded owner to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### addBusinessAdmins

          void addBusinessAdmins(long taskId,
                                 boolean removeExisting,
                                 org.kie.api.task.model.OrganizationalEntity... orgEntities)
                          throws TaskNotFoundException

      Adds new business admin for a given task. Can be instructed to remove existing business admins. Task must be in active state.
      Parameters:
        `taskId` - unique task id
        `removeExisting` - specifies if existing business admins should be removed
        `orgEntities` - one or more business admin to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### addBusinessAdmins

          void addBusinessAdmins(String deploymentId,
                                 long taskId,
                                 boolean removeExisting,
                                 org.kie.api.task.model.OrganizationalEntity... orgEntities)
                          throws TaskNotFoundException

      Adds new business admin for a given task. Can be instructed to remove existing business admins. Task must be in active state.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `removeExisting` - specifies if existing business admins should be removed
        `orgEntities` - one or more business admin to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### addPotentialOwners

          void addPotentialOwners(String userId,
                                  String deploymentId,
                                  long taskId,
                                  boolean removeExisting,
                                  org.kie.api.task.model.OrganizationalEntity... orgEntities)
                           throws TaskNotFoundException

      Adds new potential owners for a given task. Can be instructed to remove existing potential owners which means that the task will be released in case it was claimed already. Task must be in active state.
      Parameters:
        `userId` - user doing the update
        `deploymentId` -
        `taskId` - unique task id
        `removeExisting` - specifies if existing potential owners should be removed
        `orgEntities` - one or more potential owner to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### addExcludedOwners

          void addExcludedOwners(String userId,
                                 String deploymentId,
                                 long taskId,
                                 boolean removeExisting,
                                 org.kie.api.task.model.OrganizationalEntity... orgEntities)
                          throws TaskNotFoundException

      Adds new excluded owners for a given task. Can be instructed to remove existing excluded owners. Task must be in active state.
      Parameters:
        `userId` - user doing the update
        `deploymentId` -
        `taskId` - unique task id
        `removeExisting` - specifies if existing excluded owners should be removed
        `orgEntities` - one or more excluded owner to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### addBusinessAdmins

          void addBusinessAdmins(String userId,
                                 String deploymentId,
                                 long taskId,
                                 boolean removeExisting,
                                 org.kie.api.task.model.OrganizationalEntity... orgEntities)
                          throws TaskNotFoundException

      Adds new business admin for a given task. Can be instructed to remove existing business admins. Task must be in active state.
      Parameters:
        `userId` - user doing the update
        `deploymentId` -
        `taskId` - unique task id
        `removeExisting` - specifies if existing business admins should be removed
        `orgEntities` - one or more business admin to be added to a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### removePotentialOwners

          void removePotentialOwners(long taskId,
                                     org.kie.api.task.model.OrganizationalEntity... orgEntities)
                              throws TaskNotFoundException

      Remove existing potential owners from given task. Task must be in active state.
      Parameters:
        `taskId` - unique task id
        `orgEntities` - one or more potential owner to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### removePotentialOwners

          void removePotentialOwners(String deploymentId,
                                     long taskId,
                                     org.kie.api.task.model.OrganizationalEntity... orgEntities)
                              throws TaskNotFoundException

      Remove existing potential owners from given task. Task must be in active state.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `orgEntities` - one or more potential owner to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### removeExcludedOwners

          void removeExcludedOwners(long taskId,
                                    org.kie.api.task.model.OrganizationalEntity... orgEntities)
                             throws TaskNotFoundException

      Remove existing excluded owners from given task. Task must be in active state.
      Parameters:
        `taskId` - unique task id
        `orgEntities` - one or more excluded owner to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### removeExcludedOwners

          void removeExcludedOwners(String deploymentId,
                                    long taskId,
                                    org.kie.api.task.model.OrganizationalEntity... orgEntities)
                             throws TaskNotFoundException

      Remove existing excluded owners from given task. Task must be in active state.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `orgEntities` - one or more excluded owner to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### removeBusinessAdmins

          void removeBusinessAdmins(long taskId,
                                    org.kie.api.task.model.OrganizationalEntity... orgEntities)
                             throws TaskNotFoundException,
                                    IllegalStateException

      Remove existing business admin from given task. Task must be in active state.
      Parameters:
        `taskId` - unique task id
        `orgEntities` - one or more business admin to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id
        `IllegalStateException` - in case there are no business admins left on a task - there must be at least one business admin

    - #### removeBusinessAdmins

          void removeBusinessAdmins(String deploymentId,
                                    long taskId,
                                    org.kie.api.task.model.OrganizationalEntity... orgEntities)
                             throws TaskNotFoundException,
                                    IllegalStateException

      Remove existing business admin from given task. Task must be in active state.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `orgEntities` - one or more business admin to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id
        `IllegalStateException` - in case there are no business admins left on a task - there must be at least one business admin

    - #### removePotentialOwners

          void removePotentialOwners(String userId,
                                     String deploymentId,
                                     long taskId,
                                     org.kie.api.task.model.OrganizationalEntity... orgEntities)
                              throws TaskNotFoundException

      Remove existing potential owners from given task. Task must be in active state.
      Parameters:
        `userId` - user doing the update
        `deploymentId` -
        `taskId` - unique task id
        `orgEntities` - one or more potential owner to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### removeExcludedOwners

          void removeExcludedOwners(String userId,
                                    String deploymentId,
                                    long taskId,
                                    org.kie.api.task.model.OrganizationalEntity... orgEntities)
                             throws TaskNotFoundException

      Remove existing excluded owners from given task. Task must be in active state.
      Parameters:
        `userId` - user doing the update
        `deploymentId` -
        `taskId` - unique task id
        `orgEntities` - one or more excluded owner to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### removeBusinessAdmins

          void removeBusinessAdmins(String userId,
                                    String deploymentId,
                                    long taskId,
                                    org.kie.api.task.model.OrganizationalEntity... orgEntities)
                             throws TaskNotFoundException,
                                    IllegalStateException

      Remove existing business admin from given task. Task must be in active state.
      Parameters:
        `userId` - user doing the update
        `deploymentId` -
        `taskId` - unique task id
        `orgEntities` - one or more business admin to be removed from a task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id
        `IllegalStateException` - in case there are no business admins left on a task - there must be at least one business admin

    - #### addTaskInput

          void addTaskInput(long taskId,
                            String name,
                            Object value)
                     throws TaskNotFoundException

      Adds new item to task input variables.
      Parameters:
        `taskId` - unique task id
        `name` - name of the input variable to be added
        `value` - value of the input variable
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### addTaskInput

          void addTaskInput(String deploymentId,
                            long taskId,
                            String name,
                            Object value)
                     throws TaskNotFoundException

      Adds new item to task input variables.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `name` - name of the input variable to be added
        `value` - value of the input variable
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### addTaskInputs

          void addTaskInputs(long taskId,
                             Map<String,Object> data)
                      throws TaskNotFoundException

      Adds new items to task input variables.
      Parameters:
        `taskId` - unique task id
        `data` - map of key (name of the variable) and value (value of the variable)
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### addTaskInputs

          void addTaskInputs(String deploymentId,
                             long taskId,
                             Map<String,Object> data)
                      throws TaskNotFoundException

      Adds new items to task input variables.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `data` - map of key (name of the variable) and value (value of the variable)
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### removeTaskInputs

          void removeTaskInputs(long taskId,
                                String... name)
                         throws TaskNotFoundException

      Removes one or more input variables from a task.
      Parameters:
        `taskId` - unique task id
        `name` - name(s) of the input variables to be removed
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### removeTaskInputs

          void removeTaskInputs(String deploymentId,
                                long taskId,
                                String... name)
                         throws TaskNotFoundException

      Removes one or more input variables from a task.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `name` - name(s) of the input variables to be removed
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### removeTaskOutputs

          void removeTaskOutputs(long taskId,
                                 String... name)
                          throws TaskNotFoundException

      Removes one or more output variables from a task.
      Parameters:
        `taskId` - unique task id
        `name` - name(s) of the output variables to be removed
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### removeTaskOutputs

          void removeTaskOutputs(String deploymentId,
                                 long taskId,
                                 String... name)
                          throws TaskNotFoundException

      Removes one or more output variables from a task.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `name` - name(s) of the output variables to be removed
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### reassignWhenNotStarted

          Long reassignWhenNotStarted(long taskId,
                                      String timeExpression,
                                      org.kie.api.task.model.OrganizationalEntity... orgEntities)
                               throws TaskNotFoundException

      Reassign automatically a task in case it was not started before time given as timeExpression elapses.
      Parameters:
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `orgEntities` - users/groups that will be reassigned to after conditions are met
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### reassignWhenNotStarted

          Long reassignWhenNotStarted(String deploymentId,
                                      long taskId,
                                      String timeExpression,
                                      org.kie.api.task.model.OrganizationalEntity... orgEntities)
                               throws TaskNotFoundException

      Reassign automatically a task in case it was not started before time given as timeExpression elapses.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `orgEntities` - users/groups that will be reassigned to after conditions are met
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### reassignWhenNotCompleted

          Long reassignWhenNotCompleted(long taskId,
                                        String timeExpression,
                                        org.kie.api.task.model.OrganizationalEntity... orgEntities)
                                 throws TaskNotFoundException

      Reassign automatically a task in case it was not completed before time given as timeExpression elapses.
      Parameters:
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `orgEntities` - users/groups that will be reassigned to after conditions are met
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### reassignWhenNotCompleted

          Long reassignWhenNotCompleted(String deploymentId,
                                        long taskId,
                                        String timeExpression,
                                        org.kie.api.task.model.OrganizationalEntity... orgEntities)
                                 throws TaskNotFoundException

      Reassign automatically a task in case it was not completed before time given as timeExpression elapses.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `orgEntities` - users/groups that will be reassigned to after conditions are met
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### notifyWhenNotStarted

          Long notifyWhenNotStarted(long taskId,
                                    String timeExpression,
                                    org.kie.internal.task.api.model.Notification notification)
                             throws TaskNotFoundException

      Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.
      Parameters:
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `notification` - actual notification to be sent
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### notifyWhenNotStarted

          Long notifyWhenNotStarted(String deploymentId,
                                    long taskId,
                                    String timeExpression,
                                    org.kie.internal.task.api.model.Notification notification)
                             throws TaskNotFoundException

      Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `notification` - actual notification to be sent
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### notifyWhenNotCompleted

          Long notifyWhenNotCompleted(long taskId,
                                      String timeExpression,
                                      org.kie.internal.task.api.model.Notification notification)
                               throws TaskNotFoundException

      Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.
      Parameters:
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `notification` - actual notification to be sent
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### notifyWhenNotCompleted

          Long notifyWhenNotCompleted(String deploymentId,
                                      long taskId,
                                      String timeExpression,
                                      org.kie.internal.task.api.model.Notification notification)
                               throws TaskNotFoundException

      Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `timeExpression` - time expression in duration format as 2s, 5h, 7d
        `notification` - actual notification to be sent
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### buildEmailNotification

          org.kie.internal.task.api.model.EmailNotification buildEmailNotification(String subjectStr,
                                                                                   List<org.kie.api.task.model.OrganizationalEntity> recipients,
                                                                                   String bodyStr,
                                                                                   String fromStr,
                                                                                   String replyToStr)

      Builds email notification based on given parameters that can be used as argument for notifyWhenNotStarted and notifyWhenNotCompleted methods
      Parameters:
        `subjectStr` - email subject
        `recipients` - list of recipients to be included in the notification, must be at least one
        `bodyStr` - email body, can reference task variables
        `fromStr` - user who sends the email
        `replyToStr` - optional reply to address
      Returns:
        completely configured email notification instance

    - #### getTaskReassignments

          Collection<TaskReassignment> getTaskReassignments(long taskId,
                                                            boolean activeOnly)
                                                     throws TaskNotFoundException

      Returns task reassignments scheduled for given task
      Parameters:
        `taskId` - unique task id
        `activeOnly` - determines if only active (not yet fired) should be returned
      Returns:
        returns list of task reassignments for given task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### getTaskReassignments

          Collection<TaskReassignment> getTaskReassignments(String deploymentId,
                                                            long taskId,
                                                            boolean activeOnly)
                                                     throws TaskNotFoundException

      Returns task reassignments scheduled for given task
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `activeOnly` - determines if only active (not yet fired) should be returned
      Returns:
        returns list of task reassignments for given task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### getTaskNotifications

          Collection<TaskNotification> getTaskNotifications(long taskId,
                                                            boolean activeOnly)
                                                     throws TaskNotFoundException

      Returns task notifications scheduled for given task
      Parameters:
        `taskId` - unique task id
        `activeOnly` - determines if only active (not yet fired) should be returned
      Returns:
        returns list of task notifications for given task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### getTaskNotifications

          Collection<TaskNotification> getTaskNotifications(String deploymentId,
                                                            long taskId,
                                                            boolean activeOnly)
                                                     throws TaskNotFoundException

      Returns task notifications scheduled for given task
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `activeOnly` - determines if only active (not yet fired) should be returned
      Returns:
        returns list of task notifications for given task
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### cancelNotification

          void cancelNotification(long taskId,
                                  long notificationId)
                           throws TaskNotFoundException

      Cancels given notification on a task
      Parameters:
        `taskId` - unique task id
        `notificationId` - unique notification id
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### cancelNotification

          void cancelNotification(String deploymentId,
                                  long taskId,
                                  long notificationId)
                           throws TaskNotFoundException

      Cancels given notification on a task
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `notificationId` - unique notification id
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### cancelReassignment

          void cancelReassignment(long taskId,
                                  long reassignmentId)
                           throws TaskNotFoundException

      Cancels given reassignment on a task
      Parameters:
        `taskId` - unique task id
        `reassignmentId` - unique reassignment id
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id

    - #### cancelReassignment

          void cancelReassignment(String deploymentId,
                                  long taskId,
                                  long reassignmentId)
                           throws TaskNotFoundException

      Cancels given reassignment on a task
      Parameters:
        `deploymentId` -
        `taskId` - unique task id
        `reassignmentId` - unique reassignment id
      Throws:
        `TaskNotFoundException` - thrown when there is no task with given id or is not associated with given deployment id

    - #### getErrorsByTaskId

          List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskId(long taskId,
                                                                                boolean includeAcknowledged,
                                                                                org.kie.api.runtime.query.QueryContext queryContext)

      Returns execution errors for given task id
      Parameters:
        `taskId` - unique task id
        `includeAcknowledged` - indicates whether to include acknowledged errors or not
        `queryContext` - control parameters for pagination
      Returns:
        list of found errors

    - #### getErrorsByTaskName

          List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskName(String taskName,
                                                                                  boolean includeAcknowledged,
                                                                                  org.kie.api.runtime.query.QueryContext queryContext)

      Returns execution errors for given task name
      Parameters:
        `taskName` - name of the task
        `includeAcknowledged` - indicates whether to include acknowledged errors or not
        `queryContext` - control parameters for pagination
      Returns:
        list of found errors

    - #### getErrorsByTaskName

          List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskName(String processId,
                                                                                  String taskName,
                                                                                  boolean includeAcknowledged,
                                                                                  org.kie.api.runtime.query.QueryContext queryContext)

      Returns execution errors for given task name and process id
      Parameters:
        `processId` - process id of the process that task belongs to
        `taskName` - name of the task
        `includeAcknowledged` - indicates whether to include acknowledged errors or not
        `queryContext` - control parameters for pagination
      Returns:
        list of found errors

    - #### getErrorsByTaskName

          List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskName(String deploymentId,
                                                                                  String processId,
                                                                                  String taskName,
                                                                                  boolean includeAcknowledged,
                                                                                  org.kie.api.runtime.query.QueryContext queryContext)

      Returns execution errors for given task name, process id and deployment id
      Parameters:
        `deploymentId` - deployment id that contains given process
        `processId` - process id of the process that task belongs to
        `taskName` - name of the task
        `includeAcknowledged` - indicates whether to include acknowledged errors or not
        `queryContext` - control parameters for pagination
      Returns:
        list of found errors

    - #### acknowledgeError

          void acknowledgeError(String... errorId)
                         throws ExecutionErrorNotFoundException

      Acknowledge given error that it was reviewed and understood
      Parameters:
        `errorId` - unique id of the error
      Throws:
        `ExecutionErrorNotFoundException` - thrown when there is no unacknowledged error with that id

    - #### getError

          org.kie.internal.runtime.error.ExecutionError getError(String errorId)
                                                          throws ExecutionErrorNotFoundException

      Returns execution error identified by given error id
      Parameters:
        `errorId` - unique id of the error
      Returns:
        returns execution error instance
      Throws:
        `ExecutionErrorNotFoundException` - is thrown in case no error was found for given error id

    - #### getErrors

          List<org.kie.internal.runtime.error.ExecutionError> getErrors(boolean includeAcknowledged,
                                                                        org.kie.api.runtime.query.QueryContext queryContext)

      Returns execution errors that are classified as task type errors
      Parameters:
        `includeAcknowledged` - indicates whether to include acknowledged errors or not
        `queryContext` - control parameters for pagination
      Returns:
        list of found errors

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