Class CaseExecutionCommandBuilderImpl
- All Implemented Interfaces:
- CaseExecutionCommandBuilder
- Author:
- Roman Smirnov
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Stringprotected CommandContextprotected CommandExecutorprotected Collection<String>protected Collection<String>protected VariableMapImplprotected VariableMapImpl
- 
Constructor SummaryConstructorsConstructorDescriptionCaseExecutionCommandBuilderImpl(CommandContext commandContext, String caseExecutionId) CaseExecutionCommandBuilderImpl(CommandExecutor commandExecutor, String caseExecutionId) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Additionally toCaseExecutionCommandBuilder.execute()the associated case instance will be closed, so that no further work or modifications is allowed for the associated case instance.voidcomplete()Additionally toCaseExecutionCommandBuilder.execute()the associated case execution will be completed.voiddisable()Additionally toCaseExecutionCommandBuilder.execute()the associated case execution will be disabled.protected voidprotected voidprotected voidensureVariableShouldNotBeRemoved(String variableName) protected voidensureVariableShouldNotBeSet(String variableName) protected voidprotected voidprotected voidensureVariablesShouldNotBeRemoved(Collection<String> variableNames) protected voidensureVariablesShouldNotBeSet(Collection<String> variableNames) voidexecute()Invoking this method will remove and/or set the passed variables.protected voidexecuteCommand(Command<?> command) voidAdditionally toCaseExecutionCommandBuilder.execute()the associated case execution will be started manually.voidreenable()Additionally toCaseExecutionCommandBuilder.execute()the associated case execution will be re-enabled.removeVariable(String variableName) Pass a variable name of a variable to be removed for a case execution.removeVariableLocal(String variableName) Pass a variable name of a local variable to be removed for a case execution (not considering parent scopes).removeVariables(Collection<String> variableNames) Pass a collection of variable names of variables to be removed for a case execution.removeVariablesLocal(Collection<String> variableNames) Pass a collection of variable names of local variables to be removed for a case execution (not considering parent scopes).setVariable(String variableName, Object variableValue) Pass a variable to the case execution.setVariableLocal(String localVariableName, Object localVariableValue) Pass a local variable to the case execution (not considering parent scopes).setVariables(Map<String, Object> variables) Pass a map of variables to the case execution.setVariablesLocal(Map<String, Object> variablesLocal) Pass a map of variables to the case execution (not considering parent scopes).voidAdditionally toCaseExecutionCommandBuilder.execute()the associated case execution will be terminated.
- 
Field Details- 
commandExecutor
- 
commandContext
- 
caseExecutionId
- 
variables
- 
variablesLocal
- 
variableDeletions
- 
variableLocalDeletions
 
- 
- 
Constructor Details- 
CaseExecutionCommandBuilderImpl
- 
CaseExecutionCommandBuilderImpl
 
- 
- 
Method Details- 
setVariableDescription copied from interface:CaseExecutionCommandBuilderPass 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. - Specified by:
- setVariablein interface- CaseExecutionCommandBuilder
- Parameters:
- variableName- the name of the variable to set
- variableValue- the value of the variable to set
- Returns:
- the builder
 
- 
setVariablesDescription copied from interface:CaseExecutionCommandBuilderPass 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. - Specified by:
- setVariablesin interface- CaseExecutionCommandBuilder
- Parameters:
- variables- the map of variables
- Returns:
- the builder
 
- 
setVariableLocalpublic CaseExecutionCommandBuilder setVariableLocal(String localVariableName, Object localVariableValue) Description copied from interface:CaseExecutionCommandBuilderPass a local variable to the case execution (not considering parent scopes). Invoking this method multiple times allows passing multiple variables. - Specified by:
- setVariableLocalin interface- CaseExecutionCommandBuilder
- Parameters:
- localVariableName- the name of the variable to set
- localVariableValue- the value of the variable to set
- Returns:
- the builder
 
- 
setVariablesLocalDescription copied from interface:CaseExecutionCommandBuilderPass a map of variables to the case execution (not considering parent scopes). Invoking this method multiple times allows passing multiple variables. - Specified by:
- setVariablesLocalin interface- CaseExecutionCommandBuilder
- Parameters:
- variablesLocal- the map of variables
- Returns:
- the builder
 
- 
removeVariableDescription copied from interface:CaseExecutionCommandBuilderPass a variable name of a variable to be removed for a case execution. Invoking this method multiple times allows passing multiple variable names. - Specified by:
- removeVariablein interface- CaseExecutionCommandBuilder
- Parameters:
- variableName- the name of a variable to remove
- Returns:
- the builder
 
- 
removeVariablesDescription copied from interface:CaseExecutionCommandBuilderPass a collection of variable names of variables to be removed for a case execution. Invoking this method multiple times allows passing multiple variable names. - Specified by:
- removeVariablesin interface- CaseExecutionCommandBuilder
- Parameters:
- variableNames- a collection of names of variables to remove
- Returns:
- the builder
 
- 
removeVariableLocalDescription copied from interface:CaseExecutionCommandBuilderPass 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. - Specified by:
- removeVariableLocalin interface- CaseExecutionCommandBuilder
- Parameters:
- variableName- the name of a variable to remove
- Returns:
- the builder
 
- 
removeVariablesLocalDescription copied from interface:CaseExecutionCommandBuilderPass 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. - Specified by:
- removeVariablesLocalin interface- CaseExecutionCommandBuilder
- Parameters:
- variableNames- a collection of names of variables to remove
- Returns:
- the builder
 
- 
ensureVariablesShouldNotBeRemoved
- 
ensureVariableShouldNotBeRemoved
- 
ensureVariablesShouldNotBeSet
- 
ensureVariableShouldNotBeSet
- 
ensureVariablesInitializedprotected void ensureVariablesInitialized()
- 
ensureVariablesLocalInitializedprotected void ensureVariablesLocalInitialized()
- 
ensureVariableDeletionsInitializedprotected void ensureVariableDeletionsInitialized()
- 
ensureVariableDeletionsLocalInitializedprotected void ensureVariableDeletionsLocalInitialized()
- 
executepublic void execute()Description copied from interface:CaseExecutionCommandBuilderInvoking this method will remove and/or set the passed variables. This behaves as follows: - if at least one variable name of a variable to remove is passed, those variables will be removed.
- if at least one local variable name of a local variable to remove is passed, those local variables will be removed.
- if at least one variable to add or update is passed, those variables will be set for a case execution.
- if at least one local variable to add or update is passed, those variables will be set for a case execution.
 - Specified by:
- executein interface- CaseExecutionCommandBuilder
 
- 
manualStartpublic void manualStart()Description copied from interface:CaseExecutionCommandBuilderAdditionally to CaseExecutionCommandBuilder.execute()the associated case execution will be started manually. Therefore there happens a transition from the stateENABLEDto stateACTIVE.According to CMMN 1.0 specification the state ACTIVEmeans, that the with the case execution relatedStageorTaskis executing in this state:- Task: the- taskwill be completed immediately
- HumanTask: a new- user taskwill be instantiated
- ProcessTask: a new- process instancewill be instantiated
- CaseTask: a new- case instancewill be instantiated
 - Specified by:
- manualStartin interface- CaseExecutionCommandBuilder
 
- 
disablepublic void disable()Description copied from interface:CaseExecutionCommandBuilderAdditionally to CaseExecutionCommandBuilder.execute()the associated case execution will be disabled. Therefore there happens a transition from the stateENABLEDto stateDISABLED.According to CMMN 1.0 specification the state DISABLEDmeans, that the with the case execution relatedStageorTaskshould 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. - Specified by:
- disablein interface- CaseExecutionCommandBuilder
 
- 
reenablepublic void reenable()Description copied from interface:CaseExecutionCommandBuilderAdditionally to CaseExecutionCommandBuilder.execute()the associated case execution will be re-enabled. Therefore there happens a transition from the stateDISABLEDto stateENABLED.According to CMMN 1.0 specification the state DISABLEDmeans, that the with the case execution relatedStageorTaskis waiting for a decision to becomeACTIVEorDISABLEDonce again.- Specified by:
- reenablein interface- CaseExecutionCommandBuilder
 
- 
completepublic void complete()Description copied from interface:CaseExecutionCommandBuilderAdditionally to CaseExecutionCommandBuilder.execute()the associated case execution will be completed. Therefore there happens a transition from the stateACTIVEto stateCOMPLETED.It is only possible to complete a case execution which is associated with a StageorTask.In case of a Stagethe completion can only be performed when the following criteria are fulfilled:
 - there are no children in the state ACTIVE
 For a Taskinstance, this means its purpose has been accomplished:
 - HumanTaskhas 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. - Specified by:
- completein interface- CaseExecutionCommandBuilder
 
- there are no children in the state 
- 
closepublic void close()Description copied from interface:CaseExecutionCommandBuilderAdditionally 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 stateCOMPLETEDto stateCLOSED.- Specified by:
- closein interface- CaseExecutionCommandBuilder
 
- 
terminatepublic void terminate()Description copied from interface:CaseExecutionCommandBuilderAdditionally to CaseExecutionCommandBuilder.execute()the associated case execution will be terminated. Therefore there happens a transition to stateTERMINATED.- Specified by:
- terminatein interface- CaseExecutionCommandBuilder
 
- 
executeCommand
- 
getCaseExecutionId
- 
getVariables
- 
getVariablesLocal
- 
getVariableDeletions
- 
getVariableLocalDeletions
 
-