Interface ITaskServiceProvider
public interface ITaskServiceProvider
Container provides implementation for this interface to be consumed by TaskContentProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptTask
(ITaskInfo taskInfo) Accepts the task as current user.void
addTaskAuditRecord
(String taskID, int operation, String sourceID, Map<String, ?> properties) Adds a records to task audit logboolean
Checks if user has rights to execute action on the taskvoid
delegateTask
(String taskID, String[] fromUserID, String[] toUserID, boolean overwriteExisting) Delegate a task from one set of users to another set.void
deleteTask
(String taskID) Stops and deletes taskgetDelegatedBy
(String userID, String taskID) Returns ID of the principal who delegated this task to the current user or null if task was not delegatedgetProcessDeployVersion
(String processInstanceID) Retrieves deployVersion for process instance ID.getTaskAudit
(String taskID) getTaskData
(String taskID) Returns task data by given taskIDgetTaskInfo
(String taskID) Returns task info by given taskID.getTaskTypeID
(String taskID) getTaskTypeName
(String taskTypeID) boolean
isProcessArchived
(String processID) Checks ProcessAudit database for presence of given process instanceboolean
isThresholdReached
(String taskID) Returns true if the task can transition to the next status based on a threshold, otherwise returns false.queueNewTask
(String taskTypeID, ITaskInfo taskInfo, ITaskData taskData) Queues new task using specified task type IDvoid
removeTaskVotes
(String taskID) Clears all the votes for the task.void
rollbackTask
(String taskID, String auditID) Rollsback a task to the specified audit IDITask[]
searchAllTasks
(TaskSearchQuery taskQuery, boolean includeTaskData) Searches all taskssearchAllTasksPaged
(TaskSearchQueryV2 taskQuery, boolean businessData) Searches all tasks and return the result as pageable listint
searchAllTasksTotalCount
(TaskSearchQueryV2 taskQuery, boolean businessData) Searches all tasks and return total countITask[]
searchUserTasks
(TaskSearchQuery taskQuery, boolean includeTaskData) Searches user inbox taskssearchUserTasksPaged
(TaskSearchQueryV2 taskQuery, boolean businessData) Searches all tasks in user inboxint
searchUserTasksTotalCount
(TaskSearchQueryV2 taskQuery, boolean businessData) Searches all tasks in user inbox and return the total countvoid
Sets IS configuration for Monitor to default server.void
unacceptTask
(ITaskInfo taskInfo) Unaccepts the task as current user.void
updateTask
(ITaskInfo taskInfo, ITaskData taskData) Updates taskvoid
Vote for a task with a status of choice.
-
Method Details
-
searchAllTasks
Searches all tasks- Parameters:
taskQuery
- specifies the search criteriaincludeTaskData
- 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
Searches user inbox tasks- Parameters:
taskQuery
- specifies the search criteriaincludeTaskData
- 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
Returns task info by given taskID.- Parameters:
taskID
-- Returns:
- TaskInfo or null if not found
- Throws:
Exception
-
getTaskData
Returns task data by given taskID- Parameters:
taskID
-- Returns:
- TaskData or null if not found
- Throws:
Exception
-
queueNewTask
Queues new task using specified task type ID- Parameters:
taskTypeID
-taskInfo
-taskData
-- Returns:
- queued taskID if task has been queued successfully
- Throws:
Exception
-
updateTask
Updates task- Parameters:
taskInfo
-taskData
-- Throws:
Exception
-
acceptTask
Accepts the task as current user.- Parameters:
taskInfo
-- Throws:
Exception
-
unacceptTask
Unaccepts the task as current user.- Parameters:
taskInfo
-- Throws:
Exception
-
deleteTask
Stops and deletes task- Parameters:
taskInfo
-- Throws:
Exception
-
getCurrentUserID
- Returns:
- user ID of the current user
- Throws:
Exception
-
getTaskTypeID
- Returns:
- task type ID for the given task
- Throws:
Exception
-
getTaskTypeName
- Returns:
- display name of the task type
- Throws:
Exception
-
canUser
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
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 delegatefromUserID
- - Array of principal UIDs as String[] to delegate fromtoUserID
- - Array of principal UIDs as String[] to delegate tooverwriteExisting
- - true to clear the existing delegation list, otherwise append new entries- Throws:
Exception
-
getTaskAudit
- Parameters:
taskID
-- Returns:
- task audit information for the task
- Throws:
Exception
-
addTaskAuditRecord
void addTaskAuditRecord(String taskID, int operation, String sourceID, Map<String, ?> properties) throws ExceptionAdds a records to task audit log- Parameters:
taskID
- taskID to add audit record tooperation
- audit record operationsourceID
- source identifier (may be null)properties
- audit properties (may be null)- Throws:
Exception
-
voteTask
Vote for a task with a status of choice.- Parameters:
taskID
-status
-- Throws:
Exception
-
isThresholdReached
Returns true if the task can transition to the next status based on a threshold, otherwise returns false.- Parameters:
taskID
-- Returns:
- Throws:
PortalException
-
removeTaskVotes
Clears all the votes for the task.- Parameters:
taskID
-- Throws:
Exception
-
rollbackTask
Rollsback a task to the specified audit ID- Parameters:
taskID
-auditID
-- Throws:
Exception
-
getCurrentTask
- Returns:
- current task which rules are current processing
- Throws:
Exception
-
setDefaultMonitorISConfig
Sets IS configuration for Monitor to default server. This is required when opening a process instance page- Throws:
Exception
-
getProcessDeployVersion
Retrieves deployVersion for process instance ID. This is required for URL to the Monitor page- Parameters:
processInstanceID
-- Throws:
Exception
-
isProcessArchived
Checks ProcessAudit database for presence of given process instance- Returns:
- true if the given process instance presents in process audit database
- Throws:
Exception
-
searchUserTasksTotalCount
Searches all tasks in user inbox and return the total count- Parameters:
taskQuery
- specifies the search criteriabusinessData
- 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 criteriabusinessData
- indicates whether business data is included in the search or not- Returns:
- list of all the tasks in user inbox
- Throws:
Exception
-
searchAllTasksTotalCount
Searches all tasks and return total count- Parameters:
taskQuery
- specifies the search criteriabusinessData
- 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 criteriabusinessData
- indicates whether business data is included in the search or not- Returns:
- pageable list of all tasks
- Throws:
Exception
-