Interface WorkflowTaskManager
-
- All Known Implementing Classes:
FlowableUserWorkflowAdapter
public interface WorkflowTaskManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserWorkflowResult<String>
executeNextTask(WorkflowTaskExecInput workflowTaskExecInput)
Execute a task on an user.List<WorkflowTask>
getAvailableTasks(String userKey)
Get tasks available for execution, for given user.<T> T
getVariable(String executionId, String variableName, Class<T> variableClass)
Gets variable value.void
setVariable(String executionId, String variableName, Object value)
Updates or create sa variable for an execution.
-
-
-
Method Detail
-
getVariable
<T> T getVariable(String executionId, String variableName, Class<T> variableClass)
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:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no execution is found for the given executionId.ClassCastException
- when cannot cast variable to given class
-
setVariable
void setVariable(String executionId, String variableName, Object value)
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:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no execution is found for the given executionId.
-
getAvailableTasks
List<WorkflowTask> getAvailableTasks(String userKey)
Get tasks available for execution, for given user.- Parameters:
userKey
- user key- Returns:
- available tasks
-
executeNextTask
UserWorkflowResult<String> executeNextTask(WorkflowTaskExecInput workflowTaskExecInput)
Execute a task on an user.- Parameters:
workflowTaskExecInput
- input for task execution- Returns:
- user after task execution
-
-