@Component(value="bpm_TaskCompletion") public class TaskCompletionImpl extends java.lang.Object implements TaskCompletion
| Modifier and Type | Field and Description | 
|---|---|
protected io.jmix.ui.UiEventPublisher | 
eventPublisher  | 
protected io.jmix.ui.screen.FrameOwner | 
frameOwner  | 
protected java.lang.String | 
outcome  | 
protected ProcessFormVariablesCollector | 
processFormVariablesCollector  | 
protected java.util.Map<java.lang.String,java.lang.Object> | 
processVariables  | 
protected boolean | 
saveInjectedProcessVariables  | 
protected org.flowable.task.api.Task | 
task  | 
protected BpmTaskService | 
taskService  | 
| Constructor and Description | 
|---|
TaskCompletionImpl()  | 
| Modifier and Type | Method and Description | 
|---|---|
TaskCompletion | 
addProcessVariable(java.lang.String name,
                  java.lang.Object value)
Adds a single process variable. 
 | 
void | 
complete()
Completes the task using the  
Task from the ProcessFormContextImpl | 
TaskCompletion | 
saveInjectedProcessVariables()
Values of form fields that are annotated with the  
ProcessVariable will be collected and written
 to process variables when the task is completed. | 
TaskCompletion | 
withFrameOwner(io.jmix.ui.screen.FrameOwner frameOwner)  | 
TaskCompletion | 
withOutcome(java.lang.String outcome)  | 
TaskCompletion | 
withProcessVariables(java.util.Map<java.lang.String,java.lang.Object> processVariables)  | 
TaskCompletion | 
withTask(org.flowable.task.api.Task task)  | 
@Autowired protected BpmTaskService taskService
@Autowired protected ProcessFormVariablesCollector processFormVariablesCollector
@Autowired protected io.jmix.ui.UiEventPublisher eventPublisher
protected io.jmix.ui.screen.FrameOwner frameOwner
protected org.flowable.task.api.Task task
protected java.lang.String outcome
protected java.util.Map<java.lang.String,java.lang.Object> processVariables
protected boolean saveInjectedProcessVariables
public TaskCompletion withFrameOwner(io.jmix.ui.screen.FrameOwner frameOwner)
withFrameOwner in interface TaskCompletionpublic TaskCompletion withTask(org.flowable.task.api.Task task)
withTask in interface TaskCompletionpublic TaskCompletion withProcessVariables(java.util.Map<java.lang.String,java.lang.Object> processVariables)
withProcessVariables in interface TaskCompletionpublic TaskCompletion addProcessVariable(java.lang.String name, java.lang.Object value)
TaskCompletionaddProcessVariable in interface TaskCompletionname - process variable namevalue - process variable valuepublic TaskCompletion withOutcome(java.lang.String outcome)
withOutcome in interface TaskCompletionpublic TaskCompletion saveInjectedProcessVariables()
TaskCompletionProcessVariable will be collected and written
 to process variables when the task is completed.
 
 If the operation is invoked from within the ScreenFragment then process variables will be collected not
 only from the current fragment but also from the host screen and from all other fragments included to the host screen.
saveInjectedProcessVariables in interface TaskCompletionpublic void complete()
TaskCompletionTask from the ProcessFormContextImplcomplete in interface TaskCompletion