Interface ITaskServiceProvider


public interface ITaskServiceProvider
Container provides implementation for this interface to be consumed by TaskContentProvider
  • Method Details

    • searchAllTasks

      ITask[] searchAllTasks(TaskSearchQuery taskQuery, boolean includeTaskData) throws Exception
      Searches all tasks
      Parameters:
      taskQuery - specifies the search criteria
      includeTaskData - indicates whether the search result should return task data or not
      Returns:
      task list match the search criteria, can be empty if there is no match
      Throws:
      Exception
    • searchUserTasks

      ITask[] searchUserTasks(TaskSearchQuery taskQuery, boolean includeTaskData) throws Exception
      Searches user inbox tasks
      Parameters:
      taskQuery - specifies the search criteria
      includeTaskData - indicates whether the search result should return task data or not
      Returns:
      task list match the search criteria, can be empty list if there is no match
      Throws:
      Exception
    • getTaskInfo

      ITaskInfo getTaskInfo(String taskID) throws Exception
      Returns task info by given taskID.
      Parameters:
      taskID -
      Returns:
      TaskInfo or null if not found
      Throws:
      Exception
    • getTaskData

      ITaskData getTaskData(String taskID) throws Exception
      Returns task data by given taskID
      Parameters:
      taskID -
      Returns:
      TaskData or null if not found
      Throws:
      Exception
    • queueNewTask

      String queueNewTask(String taskTypeID, ITaskInfo taskInfo, ITaskData taskData) throws Exception
      Queues new task using specified task type ID
      Parameters:
      taskTypeID -
      taskInfo -
      taskData -
      Returns:
      queued taskID if task has been queued successfully
      Throws:
      Exception
    • updateTask

      void updateTask(ITaskInfo taskInfo, ITaskData taskData) throws Exception
      Updates task
      Parameters:
      taskInfo -
      taskData -
      Throws:
      Exception
    • acceptTask

      void acceptTask(ITaskInfo taskInfo) throws Exception
      Accepts the task as current user.
      Parameters:
      taskInfo -
      Throws:
      Exception
    • unacceptTask

      void unacceptTask(ITaskInfo taskInfo) throws Exception
      Unaccepts the task as current user.
      Parameters:
      taskInfo -
      Throws:
      Exception
    • deleteTask

      void deleteTask(String taskID) throws Exception
      Stops and deletes task
      Parameters:
      taskInfo -
      Throws:
      Exception
    • getCurrentUserID

      String getCurrentUserID() throws Exception
      Returns:
      user ID of the current user
      Throws:
      Exception
    • getTaskTypeID

      String getTaskTypeID(String taskID) throws Exception
      Returns:
      task type ID for the given task
      Throws:
      Exception
    • getTaskTypeName

      String getTaskTypeName(String taskTypeID) throws Exception
      Returns:
      display name of the task type
      Throws:
      Exception
    • canUser

      boolean canUser(String taskID, String accessRight) throws Exception
      Checks if user has rights to execute action on the task
      Parameters:
      taskID -
      accessRight -
      Returns:
      boolean value indicates whether the user has rights to execute action on the task
      Throws:
      Exception
    • getDelegatedBy

      String getDelegatedBy(String userID, String taskID) throws Exception
      Returns ID of the principal who delegated this task to the current user or null if task was not delegated
      Parameters:
      userID -
      taskID -
      Returns:
      principal ID
      Throws:
      Exception
    • delegateTask

      void delegateTask(String taskID, String[] fromUserID, String[] toUserID, boolean overwriteExisting) throws Exception
      Delegate a task from one set of users to another set. Note that the fromUserID and toUserID arrays must be of equal size
      Parameters:
      taskID - - ID of the task to delegate
      fromUserID - - Array of principal UIDs as String[] to delegate from
      toUserID - - Array of principal UIDs as String[] to delegate to
      overwriteExisting - - true to clear the existing delegation list, otherwise append new entries
      Throws:
      Exception
    • getTaskAudit

      ITaskAudit[] getTaskAudit(String taskID) throws Exception
      Parameters:
      taskID -
      Returns:
      task audit information for the task
      Throws:
      Exception
    • addTaskAuditRecord

      void addTaskAuditRecord(String taskID, int operation, String sourceID, Map<String,?> properties) throws Exception
      Adds a records to task audit log
      Parameters:
      taskID - taskID to add audit record to
      operation - audit record operation
      sourceID - source identifier (may be null)
      properties - audit properties (may be null)
      Throws:
      Exception
    • voteTask

      void voteTask(String taskID, String status) throws Exception
      Vote for a task with a status of choice.
      Parameters:
      taskID -
      status -
      Throws:
      Exception
    • isThresholdReached

      boolean isThresholdReached(String taskID) throws PortalException
      Returns true if the task can transition to the next status based on a threshold, otherwise returns false.
      Parameters:
      taskID -
      Returns:
      Throws:
      PortalException
    • removeTaskVotes

      void removeTaskVotes(String taskID) throws Exception
      Clears all the votes for the task.
      Parameters:
      taskID -
      Throws:
      Exception
    • rollbackTask

      void rollbackTask(String taskID, String auditID) throws Exception
      Rollsback a task to the specified audit ID
      Parameters:
      taskID -
      auditID -
      Throws:
      Exception
    • getCurrentTask

      ITaskInfo getCurrentTask() throws Exception
      Returns:
      current task which rules are current processing
      Throws:
      Exception
    • setDefaultMonitorISConfig

      void setDefaultMonitorISConfig() throws Exception
      Sets IS configuration for Monitor to default server. This is required when opening a process instance page
      Throws:
      Exception
    • getProcessDeployVersion

      String getProcessDeployVersion(String processInstanceID) throws Exception
      Retrieves deployVersion for process instance ID. This is required for URL to the Monitor page
      Parameters:
      processInstanceID -
      Throws:
      Exception
    • isProcessArchived

      boolean isProcessArchived(String processID) throws Exception
      Checks ProcessAudit database for presence of given process instance
      Returns:
      true if the given process instance presents in process audit database
      Throws:
      Exception
    • searchUserTasksTotalCount

      int searchUserTasksTotalCount(TaskSearchQueryV2 taskQuery, boolean businessData) throws Exception
      Searches all tasks in user inbox and return the total count
      Parameters:
      taskQuery - specifies the search criteria
      businessData - indicates whether business data is included in the search or not
      Returns:
      total count of all the tasks in user inbox
      Throws:
      Exception
    • searchUserTasksPaged

      List<ITaskSearchRecord> searchUserTasksPaged(TaskSearchQueryV2 taskQuery, boolean businessData) throws Exception
      Searches all tasks in user inbox
      Parameters:
      taskQuery - specifies the search criteria
      businessData - indicates whether business data is included in the search or not
      Returns:
      list of all the tasks in user inbox
      Throws:
      Exception
    • searchAllTasksTotalCount

      int searchAllTasksTotalCount(TaskSearchQueryV2 taskQuery, boolean businessData) throws Exception
      Searches all tasks and return total count
      Parameters:
      taskQuery - specifies the search criteria
      businessData - indicates whether business data is included in the search or not
      Returns:
      total count of all the tasks
      Throws:
      Exception
    • searchAllTasksPaged

      List<ITaskSearchRecord> searchAllTasksPaged(TaskSearchQueryV2 taskQuery, boolean businessData) throws Exception
      Searches all tasks and return the result as pageable list
      Parameters:
      taskQuery - specifies the search criteria
      businessData - indicates whether business data is included in the search or not
      Returns:
      pageable list of all tasks
      Throws:
      Exception