Interface WorkflowTaskManager
- All Known Implementing Classes:
FlowableUserWorkflowAdapter
public interface WorkflowTaskManager
-
Method Summary
Modifier and TypeMethodDescriptionexecuteNextTask(WorkflowTaskExecInput workflowTaskExecInput) Execute a task on an user.getAvailableTasks(String userKey) Get tasks available for execution, for given user.<T> TgetVariable(String executionId, String variableName, Class<T> variableClass) Gets variable value.voidsetVariable(String executionId, String variableName, Object value) Updates or create sa variable for an execution.
-
Method Details
-
getVariable
Gets variable value. Returns null when no variable value is found with the given name or when the value is set to null.- Type Parameters:
T- variable type- Parameters:
executionId- id of execution, cannot be null.variableName- name of variable, cannot be null.variableClass- class of variable, cannot be null.- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
- Throws:
FlowableObjectNotFoundException- when no execution is found for the given executionId.ClassCastException- when cannot cast variable to given class
-
setVariable
Updates or create sa variable for an execution.- Parameters:
executionId- id of execution to set variable in, cannot be null.variableName- name of variable to set, cannot be null.value- value to set; when null is passed, the variable is not removed, only it's value will be set to null- Throws:
FlowableObjectNotFoundException- when no execution is found for the given executionId.
-
getAvailableTasks
Get tasks available for execution, for given user.- Parameters:
userKey- user key- Returns:
- available tasks
-
executeNextTask
Execute a task on an user.- Parameters:
workflowTaskExecInput- input for task execution- Returns:
- user after task execution
-