Interface WorkflowTaskApi
public interface WorkflowTaskApi
All the API for handling workflow tasks
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelWorkflowTask
(UUID workflowTaskId, String reason) Cancels the workflow task identified by the given UUID with provided reason.cancelWorkflowTasksInJob
(CancelWorkflowTasksRequest cancelWorkflowTasksRequest) Cancels workflow tasks in a job.completeWorkflowTasks
(CompleteWorkflowTasksRequest completeWorkflowTasksRequest) Completes tasks based on the provided request and returns the following tasks, if the current user is assigned to them.findWorkflowTasks
(FindWorkflowTasksRequest findWorkflowTasksRequest) Returns the workflow tasks matching given search criteria.getConfigurationStartFormData
(UUID workflowDefinitionId, String formPropertyType) Returns the configuration start form data of the workflow task.getFindActivitiesRequestForTask
(UUID taskId) Returns the activity filter for the workflow task identified by the given UUID.getStartFormData
(UUID workflowDefinitionId, String formPropertyType) Returns the start form data of the workflow task.getStartFormJsonModel
(UUID workflowDefinitionId) Returns the start form json model for the workflow definition.getTaskFormData
(UUID workflowTaskId, String formPropertyType) Returns the task form data of the workflow task.getTaskFormJsonModel
(UUID taskId) Returns the task form json model for the workflow task id.getVariables
(UUID taskId) Returns the variables for the workflow task id.getWorkflowTask
(UUID workflowTaskId) Returns the workflow task identified by given UUID.void
reassignTask
(UUID taskId, List<UUID> users, List<UUID> groups, List<UUID> roles, List<UUID> roleCommunities) Reassigns a task to the given users, groups and roles.
-
Method Details
-
completeWorkflowTasks
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.CollectionFormatter.class) List<WorkflowTask> completeWorkflowTasks(CompleteWorkflowTasksRequest completeWorkflowTasksRequest) Completes tasks based on the provided request and returns the following tasks, if the current user is assigned to them.- Parameters:
completeWorkflowTasksRequest
- the request describing the parameters for the workflow tasks to complete- Returns:
- the following workflow tasks, if the current user is assigned to them
- Throws:
ApiEntityNotFoundException
- if workflow task does not exist
-
getWorkflowTask
Returns the workflow task identified by given UUID.- Parameters:
workflowTaskId
- the UUID of the workflow task to return- Returns:
- the workflow task
- Throws:
ApiEntityNotFoundException
- if workflow task does not exist
-
findWorkflowTasks
@SecurityAuditMethod(resultFormatter=com.collibra.dgc.core.api.internal.security.audit.formatter.PagedResponseFormatter.class) PagedResponse<WorkflowTask> findWorkflowTasks(FindWorkflowTasksRequest findWorkflowTasksRequest) Returns the workflow tasks matching given search criteria.- Parameters:
findWorkflowTasksRequest
- the search criteria for workflow tasks- Returns:
- the found workflow tasks
-
getConfigurationStartFormData
Returns the configuration start form data of the workflow task.- Parameters:
workflowDefinitionId
- the UUID of the workflow definition that should be used for the form data retrievalformPropertyType
- the form type to be returned- Returns:
- the configuration start form data of the workflow task
- Throws:
ApiEntityNotFoundException
- if workflow definition does not exist
-
getStartFormData
Returns the start form data of the workflow task.- Parameters:
workflowDefinitionId
- the UUID of the workflow definition that should be used for the form data retrievalformPropertyType
- the form type to be returned- Returns:
- the start form data of the workflow task
- Throws:
ApiEntityNotFoundException
- if workflow definition does not exist
-
getTaskFormData
Returns the task form data of the workflow task.- Parameters:
workflowTaskId
- the UUID of the workflow task that should be used for the form data retrievalformPropertyType
- the form type to be returned- Returns:
- the task form data of the workflow task
- Throws:
ApiEntityNotFoundException
- if workflow task does not exist
-
getFindActivitiesRequestForTask
Returns the activity filter for the workflow task identified by the given UUID.- Parameters:
taskId
- the UUID of the workflow task that theFindActivitiesRequest
should be returned for- Returns:
- the activity filter for the workflow task
-
cancelWorkflowTask
Cancels the workflow task identified by the given UUID with provided reason.- Parameters:
workflowTaskId
- the UUID of the workflow task to be cancelledreason
- the reason for the cancellation of the workflow instance- Throws:
ApiEntityNotFoundException
- if workflow task does not exist
-
cancelWorkflowTasksInJob
Cancels workflow tasks in a job.- Parameters:
cancelWorkflowTasksRequest
- the properties of the workflow tasks to be cancelled- Returns:
- the job that triggers asynchronous cancellation of workflow tasks
-
reassignTask
void reassignTask(UUID taskId, List<UUID> users, List<UUID> groups, List<UUID> roles, List<UUID> roleCommunities) Reassigns a task to the given users, groups and roles.- Parameters:
taskId
- The task idusers
- A list of user id's to reassign togroups
- A list of group ids to reassign toroles
- A list of role ids to reassign toroleCommunities
- A list of Community ids of the specified roles to reassign to- Throws:
ApiEntityNotFoundException
- if workflow task does not exist
-
getStartFormJsonModel
Returns the start form json model for the workflow definition.- Parameters:
workflowDefinitionId
- the UUID of the workflow definition that should be used for the start form model retrieval- Returns:
- the start form json model
- Throws:
ApiEntityNotFoundException
- if workflow definition does not exist
-
getTaskFormJsonModel
Returns the task form json model for the workflow task id.- Parameters:
taskId
- the UUID of the workflow task- Returns:
- the task form json model
- Throws:
ApiEntityNotFoundException
- if workflow definition does not exist
-
getVariables
@SecurityAuditMethod(resultFormatter=com.collibra.audit.formatter.MapCountFormatter.class) Map<String,Object> getVariables(UUID taskId) Returns the variables for the workflow task id. WARNING: This method will not return deprecated V1 objects, they will be skipped.- Parameters:
taskId
- the UUID of the workflow task- Returns:
- the variables
- Throws:
ApiEntityNotFoundException
- if workflow definition does not exist
-