public interface TaskService
Modifier and Type | Method and Description |
---|---|
void |
assignTask(String taskId,
String assigneeId)
Assigns the user task to the specified user.
|
void |
claimTask(String taskId)
Claims the user task by assigning the task to the current user.
|
void |
completeTask(String taskId,
float actualHours,
Set<DataProperty> taskCompletionData,
String comment)
Completes the user task.
|
Set<UserTask> |
getAllCurrentUserTasks()
Gets all of the user tasks that the user is authorized to access for all active process flows.
|
Set<CompletedElement> |
getCompletedElementsByProcessFlow(String processFlowId)
Gets the completed elements of the process flow with the identifier.
|
Set<Element> |
getCurrentElementsByProcessFlow(String processFlowId)
Gets the current elements of the process flow with the identifier.
|
UserTask |
getCurrentUserTask(String taskId)
Gets the user task by the specified unique identifier.
|
Set<UserTask> |
getCurrentUserTasks()
Gets the user tasks that are assigned to the current user and tasks for which the current user is a candidate for
all active process flows.
|
int |
getSearchLimit()
Gets the maximum number of search results that are returned from a search.
|
UserTaskDetails |
getUserTaskDetails(String taskId)
Gets additional user task information, which includes the candidates, data properties, and task assignment
history.
|
TaskSearchResults |
search(TaskQuery query)
Searches the process flow tasks, based on the specified query.
|
void |
startTask(String taskId)
Starts a user task.
|
UserTaskDetails |
updateUserTask(UserTaskUpdateInfo userTask)
Updates the user task with basic properties as well as details such as candidates and completion properties.
|
Set<UserTask> getAllCurrentUserTasks() throws ProcessFlowException
ProcessFlowException
- Thrown when there is an issue when getting the tasks.Set<UserTask> getCurrentUserTasks() throws ProcessFlowException
ProcessFlowException
- thrown when there is an issue when getting the tasks.void claimTask(String taskId) throws TaskNotFoundException, InvalidTaskAssigneeException, InvalidTaskStateException, ProcessFlowException
startTask(String)
and only unassigned tasks can be claimed or assigned.taskId
- The identifier of the user task.TaskNotFoundException
- Thrown when there is an issue when getting the task.InvalidTaskAssigneeException
- Thrown when there is an issue when assigning the task to the current user.InvalidTaskStateException
- Thrown when the task is not in the proper state to claim.ProcessFlowException
- Thrown when there is an issue when claiming the task.UserTask getCurrentUserTask(String taskId) throws TaskNotFoundException, ProcessFlowException
taskId
- The identifier of the task.TaskNotFoundException
- Thrown when there is an issue when getting the task.ProcessFlowException
- Thrown when there is an issue when getting the task.void startTask(String taskId) throws TaskNotFoundException, InvalidTaskStateException, ProcessFlowException
taskId
- The identifier of the task.TaskNotFoundException
- Thrown when there is an issue when getting the task.InvalidTaskStateException
- Thrown when the task is not in the proper state to start the task.ProcessFlowException
- Thrown when there is an issue when starting the task.void assignTask(String taskId, String assigneeId) throws TaskNotFoundException, InvalidTaskStateException, InvalidTaskAssigneeException, ProcessFlowException
taskId
- The identifier of the user task.assigneeId
- The user to whom to assign the user task.TaskNotFoundException
- Thrown when there is an issue when getting the task.InvalidTaskStateException
- Thrown when the task is not in the proper state to assign.InvalidTaskAssigneeException
- Thrown when there is an issue when assigning the task to the specified user.ProcessFlowException
- Thrown when there is an issue when assigning the task.void completeTask(String taskId, float actualHours, Set<DataProperty> taskCompletionData, String comment) throws TaskNotFoundException, InvalidTaskStateException, ProcessFlowException
taskId
- The identifier of the user task.actualHours
- The actual hours of work to complete the user task.taskCompletionData
- The data properties to apply upon completion of the task.comment
- The comment regarding the completion of this task.TaskNotFoundException
- Thrown when there is an issue when getting the task.InvalidTaskStateException
- Thrown when the task is not in the proper state to complete.ProcessFlowException
- Thrown when there is an issue when completing the user task.UserTaskDetails getUserTaskDetails(String taskId) throws TaskNotFoundException, ProcessFlowException
taskId
- The identifier of the user task.TaskNotFoundException
- Thrown when the user task with the identifier does not exist.ProcessFlowException
- Thrown when there is an issue when getting the user task details.Set<Element> getCurrentElementsByProcessFlow(String processFlowId) throws ProcessFlowException, ProcessFlowNotFoundException
processFlowId
- the identifier of the process flow.ProcessFlowException
- thrown when there is an issue getting the process flow task.ProcessFlowNotFoundException
- thrown when the process flow with the identifier does not exist.Set<CompletedElement> getCompletedElementsByProcessFlow(String processFlowId) throws ProcessFlowException, ProcessFlowNotFoundException
processFlowId
- The identifier of the process flow.ProcessFlowException
- Thrown when there is an issue when getting the process flow elements.ProcessFlowNotFoundException
- Thrown when the process flow with the identifier does not exist.TaskSearchResults search(TaskQuery query) throws TaskSearchException
query
- The criteria to query the process flow tasks.TaskSearchException
- Thrown when there is an issue when searching process flows.int getSearchLimit()
UserTaskDetails updateUserTask(UserTaskUpdateInfo userTask) throws TaskNotFoundException, InvalidTaskAssigneeException, InvalidTaskStateException, ProcessFlowException
userTask
- The user task details to update.TaskNotFoundException
- Thrown when there is an issue getting the task.InvalidTaskAssigneeException
- Thrown when there is an issue when updating the user task with the specified
assignee or candidates.InvalidTaskStateException
- Thrown when the task is not in the proper state to be updated.ProcessFlowException
- Thrown when there is an issue when updating the process flow elements.<i>Copyright (c) 2022, SAS Institute Inc., Cary, NC, USA</i>