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 user tasks that the user is authorized to see 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 id.
|
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()
Return the maximum number of search results that will be returned from a search.
|
UserTaskDetails |
getUserTaskDetails(String taskId)
Gets additional user task information, which includes candidates, data properties, and task assignment history.
|
TaskSearchResults |
search(TaskQuery query)
Searches process flow tasks based on the specified query.
|
void |
startTask(String taskId)
Starts a user task.
|
Set<UserTask> getAllCurrentUserTasks() throws ProcessFlowException
ProcessFlowException
- thrown when there is an issue getting the tasks.Set<UserTask> getCurrentUserTasks() throws ProcessFlowException
ProcessFlowException
- thrown when there is an issue getting the tasks.void claimTask(String taskId) throws TaskNotFoundException, InvalidTaskAssigneeException, InvalidTaskStateException, ProcessFlowException
startTask(String)
and unassigned tasks can be claimed or assigned.taskId
- The identifier of the user task.TaskNotFoundException
- Thrown when there is an issue getting the task.InvalidTaskAssigneeException
- Thrown if there is an issue assigning the task to the current user.InvalidTaskStateException
- Thrown when the task is not in the proper state to claim the task.ProcessFlowException
- Thrown when there is an issue claiming the task.UserTask getCurrentUserTask(String taskId) throws TaskNotFoundException, ProcessFlowException
taskId
- The identifier of the task.TaskNotFoundException
- Thrown when there is an issue getting the task.ProcessFlowException
- Thrown when there is an issue getting the task.void startTask(String taskId) throws TaskNotFoundException, InvalidTaskStateException, ProcessFlowException
taskId
- The identifier of the task.TaskNotFoundException
- Thrown when there is an issue 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 starting the task.void assignTask(String taskId, String assigneeId) throws TaskNotFoundException, InvalidTaskStateException, InvalidTaskAssigneeException, ProcessFlowException
taskId
- The identifier of the user task.assigneeId
- The user in which to assign the user task.TaskNotFoundException
- Thrown when there is an issue getting the task.InvalidTaskStateException
- Thrown when the task is not in the proper state to assign the task.InvalidTaskAssigneeException
- Thrown if there is an issue assigning the task to the specified user.ProcessFlowException
- Thrown when there is an issue 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 this user task.taskCompletionData
- The data properties to apply upon completion of the task.comment
- Optionally, a comment regarding the completion of this task.TaskNotFoundException
- Thrown when there is an issue getting the task.InvalidTaskStateException
- Thrown when the task is not in the proper state to complete the task.ProcessFlowException
- Thrown when there is an issue 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 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 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 for querying process flow tasks.TaskSearchException
- Thrown when there is an issue searching process flows.int getSearchLimit()
<i>Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA</i>