public class CaseExecutionCommandBuilderImpl extends Object implements CaseExecutionCommandBuilder
Modifier and Type | Field and Description |
---|---|
protected String |
caseExecutionId |
protected CommandContext |
commandContext |
protected CommandExecutor |
commandExecutor |
protected Collection<String> |
variableDeletions |
protected Collection<String> |
variableLocalDeletions |
protected org.camunda.bpm.engine.variable.impl.VariableMapImpl |
variables |
protected org.camunda.bpm.engine.variable.impl.VariableMapImpl |
variablesLocal |
Constructor and Description |
---|
CaseExecutionCommandBuilderImpl(CommandContext commandContext,
String caseExecutionId) |
CaseExecutionCommandBuilderImpl(CommandExecutor commandExecutor,
String caseExecutionId) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Additionally to
CaseExecutionCommandBuilder.execute() the associated case instance will
be closed, so that no further work or modifications is allowed for the
associated case instance. |
void |
complete()
Additionally to
CaseExecutionCommandBuilder.execute() the associated case execution will
be completed. |
void |
disable()
Additionally to
CaseExecutionCommandBuilder.execute() the associated case execution will
be disabled. |
protected void |
ensureVariableDeletionsInitialized() |
protected void |
ensureVariableDeletionsLocalInitialized() |
protected void |
ensureVariableShouldNotBeRemoved(String variableName) |
protected void |
ensureVariableShouldNotBeSet(String variableName) |
protected void |
ensureVariablesInitialized() |
protected void |
ensureVariablesLocalInitialized() |
protected void |
ensureVariablesShouldNotBeRemoved(Collection<String> variableNames) |
protected void |
ensureVariablesShouldNotBeSet(Collection<String> variableNames) |
void |
execute()
Invoking this method will remove and/or set the passed variables.
|
protected void |
executeCommand(Command<?> command) |
String |
getCaseExecutionId() |
Collection<String> |
getVariableDeletions() |
Collection<String> |
getVariableLocalDeletions() |
org.camunda.bpm.engine.variable.VariableMap |
getVariables() |
org.camunda.bpm.engine.variable.VariableMap |
getVariablesLocal() |
void |
manualStart()
Additionally to
CaseExecutionCommandBuilder.execute() the associated case execution will
be started manually. |
void |
reenable()
Additionally to
CaseExecutionCommandBuilder.execute() the associated case execution will
be re-enabled. |
CaseExecutionCommandBuilder |
removeVariable(String variableName)
Pass a variable name of a variable to be removed for a case execution.
|
CaseExecutionCommandBuilder |
removeVariableLocal(String variableName)
Pass a variable name of a local variable to be removed for a case execution
(not considering parent scopes).
|
CaseExecutionCommandBuilder |
removeVariables(Collection<String> variableNames)
Pass a collection of variable names of variables to be removed for a
case execution.
|
CaseExecutionCommandBuilder |
removeVariablesLocal(Collection<String> variableNames)
Pass a collection of variable names of local variables to be removed for a
case execution (not considering parent scopes).
|
CaseExecutionCommandBuilder |
setVariable(String variableName,
Object variableValue)
Pass a variable to the case execution.
|
CaseExecutionCommandBuilder |
setVariableLocal(String localVariableName,
Object localVariableValue)
Pass a local variable to the case execution (not considering parent scopes).
|
CaseExecutionCommandBuilder |
setVariables(Map<String,Object> variables)
Pass a map of variables to the case execution.
|
CaseExecutionCommandBuilder |
setVariablesLocal(Map<String,Object> variablesLocal)
Pass a map of variables to the case execution (not considering parent scopes).
|
void |
terminate()
Additionally to
CaseExecutionCommandBuilder.execute() the associated case execution will
be terminated. |
protected CommandExecutor commandExecutor
protected CommandContext commandContext
protected String caseExecutionId
protected org.camunda.bpm.engine.variable.impl.VariableMapImpl variables
protected org.camunda.bpm.engine.variable.impl.VariableMapImpl variablesLocal
protected Collection<String> variableDeletions
protected Collection<String> variableLocalDeletions
public CaseExecutionCommandBuilderImpl(CommandExecutor commandExecutor, String caseExecutionId)
public CaseExecutionCommandBuilderImpl(CommandContext commandContext, String caseExecutionId)
public CaseExecutionCommandBuilder setVariable(String variableName, Object variableValue)
CaseExecutionCommandBuilder
Pass a variable to the case execution. If the variable is not already existing, they will be created in the case instance (which is the root execution) otherwise the existing variable will be updated.
Invoking this method multiple times allows passing multiple variables.
setVariable
in interface CaseExecutionCommandBuilder
variableName
- the name of the variable to setvariableValue
- the value of the variable to setpublic CaseExecutionCommandBuilder setVariables(Map<String,Object> variables)
CaseExecutionCommandBuilder
Pass a map of variables to the case execution. If the variables are not already existing, they will be created in the case instance (which is the root execution) otherwise the existing variable will be updated.
Invoking this method multiple times allows passing multiple variables.
setVariables
in interface CaseExecutionCommandBuilder
variables
- the map of variablespublic CaseExecutionCommandBuilder setVariableLocal(String localVariableName, Object localVariableValue)
CaseExecutionCommandBuilder
Pass a local variable to the case execution (not considering parent scopes).
Invoking this method multiple times allows passing multiple variables.
setVariableLocal
in interface CaseExecutionCommandBuilder
localVariableName
- the name of the variable to setlocalVariableValue
- the value of the variable to setpublic CaseExecutionCommandBuilder setVariablesLocal(Map<String,Object> variablesLocal)
CaseExecutionCommandBuilder
Pass a map of variables to the case execution (not considering parent scopes).
Invoking this method multiple times allows passing multiple variables.
setVariablesLocal
in interface CaseExecutionCommandBuilder
variablesLocal
- the map of variablespublic CaseExecutionCommandBuilder removeVariable(String variableName)
CaseExecutionCommandBuilder
Pass a variable name of a variable to be removed for a case execution.
Invoking this method multiple times allows passing multiple variable names.
removeVariable
in interface CaseExecutionCommandBuilder
variableName
- the name of a variable to removepublic CaseExecutionCommandBuilder removeVariables(Collection<String> variableNames)
CaseExecutionCommandBuilder
Pass a collection of variable names of variables to be removed for a case execution.
Invoking this method multiple times allows passing multiple variable names.
removeVariables
in interface CaseExecutionCommandBuilder
variableNames
- a collection of names of variables to removepublic CaseExecutionCommandBuilder removeVariableLocal(String variableName)
CaseExecutionCommandBuilder
Pass a variable name of a local variable to be removed for a case execution (not considering parent scopes).
Invoking this method multiple times allows passing multiple variable names.
removeVariableLocal
in interface CaseExecutionCommandBuilder
variableName
- the name of a variable to removepublic CaseExecutionCommandBuilder removeVariablesLocal(Collection<String> variableNames)
CaseExecutionCommandBuilder
Pass a collection of variable names of local variables to be removed for a case execution (not considering parent scopes).
Invoking this method multiple times allows passing multiple variable names.
removeVariablesLocal
in interface CaseExecutionCommandBuilder
variableNames
- a collection of names of variables to removeprotected void ensureVariablesShouldNotBeRemoved(Collection<String> variableNames)
protected void ensureVariableShouldNotBeRemoved(String variableName)
protected void ensureVariablesShouldNotBeSet(Collection<String> variableNames)
protected void ensureVariableShouldNotBeSet(String variableName)
protected void ensureVariablesInitialized()
protected void ensureVariablesLocalInitialized()
protected void ensureVariableDeletionsInitialized()
protected void ensureVariableDeletionsLocalInitialized()
public void execute()
CaseExecutionCommandBuilder
Invoking this method will remove and/or set the passed variables.
This behaves as follows:
execute
in interface CaseExecutionCommandBuilder
public void manualStart()
CaseExecutionCommandBuilder
Additionally to CaseExecutionCommandBuilder.execute()
the associated case execution will
be started manually. Therefore there happens a transition from the state
ENABLED
to state ACTIVE
.
According to CMMN 1.0 specification the state ACTIVE
means,
that the with the case execution related Stage
or Task
is
executing in this state:
Task
: the task
will be completed immediatelyHumanTask
: a new user task
will be instantiatedProcessTask
: a new process instance
will be instantiatedCaseTask
: a new case instance
will be instantiatedmanualStart
in interface CaseExecutionCommandBuilder
public void disable()
CaseExecutionCommandBuilder
Additionally to CaseExecutionCommandBuilder.execute()
the associated case execution will
be disabled. Therefore there happens a transition from the state ENABLED
to state DISABLED
.
According to CMMN 1.0 specification the state DISABLED
means,
that the with the case execution related Stage
or Task
should
not be executed in the case instance.
If the given case execution has a parent case execution, that parent case execution will be notified that the given case execution has been disabled. This can lead to a completion of the parent case execution if the completion criteria are fulfilled.
disable
in interface CaseExecutionCommandBuilder
public void reenable()
CaseExecutionCommandBuilder
Additionally to CaseExecutionCommandBuilder.execute()
the associated case execution will
be re-enabled. Therefore there happens a transition from the state DISABLED
to state ENABLED
.
According to CMMN 1.0 specification the state DISABLED
means,
that the with the case execution related Stage
or Task
is waiting
for a decision to become ACTIVE
or DISABLED
once again.
reenable
in interface CaseExecutionCommandBuilder
public void complete()
CaseExecutionCommandBuilder
Additionally to CaseExecutionCommandBuilder.execute()
the associated case execution will
be completed. Therefore there happens a transition from the state ACTIVE
to state COMPLETED
.
It is only possible to complete a case execution which is associated with a
Stage
or Task
.
In case of a Stage
the completion can only be performed when the following
criteria are fulfilled:
ACTIVE
For a Task
instance, this means its purpose has been accomplished:
HumanTask
has been completed by human.If the given case execution has a parent case execution, that parent case execution will be notified that the given case execution has been completed. This can lead to a completion of the parent case execution if the completion criteria are fulfilled.
complete
in interface CaseExecutionCommandBuilder
public void close()
CaseExecutionCommandBuilder
Additionally to CaseExecutionCommandBuilder.execute()
the associated case instance will
be closed, so that no further work or modifications is allowed for the
associated case instance. Therefore there happens a transition from the
state COMPLETED
to state CLOSED
.
close
in interface CaseExecutionCommandBuilder
public void terminate()
CaseExecutionCommandBuilder
Additionally to CaseExecutionCommandBuilder.execute()
the associated case execution will
be terminated. Therefore there happens a transition to state TERMINATED
.
terminate
in interface CaseExecutionCommandBuilder
protected void executeCommand(Command<?> command)
public String getCaseExecutionId()
public org.camunda.bpm.engine.variable.VariableMap getVariables()
public org.camunda.bpm.engine.variable.VariableMap getVariablesLocal()
public Collection<String> getVariableDeletions()
public Collection<String> getVariableLocalDeletions()
Copyright © 2018. All rights reserved.