Class CaseServiceImpl
- All Implemented Interfaces:
CaseService
- Author:
- Roman Smirnov
-
Field Summary
Fields inherited from class org.camunda.bpm.engine.impl.ServiceImpl
commandExecutor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseCaseInstance(String caseInstanceId) Closes the case instance the execution identified by the given id belongs to.voidcompleteCaseExecution(String caseExecutionId) Completes the case execution identified by the given id.voidcompleteCaseExecution(String caseExecutionId, Map<String, Object> variables) Completes the case execution identified by the given id.Creates a newCaseExecutionQueryinstance, that can be used to query the executions and case instances.createCaseInstanceById(String caseDefinitionId) Creates a newCaseInstancein the exactly specified version identify by the provided process definition id.createCaseInstanceById(String caseDefinitionId, String businessKey) Creates a newCaseInstancein the exactly specified version identify by the provided process definition id.Creates a newCaseInstancein the exactly specified version identify by the provided process definition id.createCaseInstanceById(String caseDefinitionId, Map<String, Object> variables) Creates a newCaseInstancein the exactly specified version identify by the provided process definition id.createCaseInstanceByKey(String caseDefinitionKey) Creates a newCaseInstanceof the latest version of the case definition with the given key.createCaseInstanceByKey(String caseDefinitionKey, String businessKey) Creates a newCaseInstanceof the latest version of the case definition with the given key.Creates a newCaseInstanceof the latest version of the case definition with the given key.createCaseInstanceByKey(String caseDefinitionKey, Map<String, Object> variables) Creates a newCaseInstanceof the latest version of the case definition with the given key.Creates a newCaseInstanceQueryinstance, that can be used to query case instances.voiddisableCaseExecution(String caseExecutionId) Disables the case execution identified by the given id.voiddisableCaseExecution(String caseExecutionId, Map<String, Object> variables) Disables the case execution identified by the given id.protected ObjectgetCaseExecutionVariable(String caseExecutionId, String variableName, boolean isLocal) protected VariableMapgetCaseExecutionVariables(String caseExecutionId, Collection<String> variableNames, boolean isLocal, boolean deserializeValues) protected <T extends TypedValue>
TgetCaseExecutionVariableTyped(String caseExecutionId, String variableName, boolean isLocal, boolean deserializeValue) getVariable(String caseExecutionId, String variableName) Searching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).getVariableLocal(String caseExecutionId, String variableName) The variable value for an case execution.<T extends TypedValue>
TgetVariableLocalTyped(String caseExecutionId, String variableName) The variable value for an case execution.<T extends TypedValue>
TgetVariableLocalTyped(String caseExecutionId, String variableName, boolean deserializeValue) The variable value for an case execution.getVariables(String caseExecutionId) All variables visible from the given execution scope (including parent scopes).getVariables(String caseExecutionId, Collection<String> variableNames) The variable values for all given variableNames, takes all variables into account which are visible from the given case execution scope (including parent scopes).getVariablesLocal(String caseExecutionId) All variable values that are defined in the case execution scope, without taking outer scopes into account.getVariablesLocal(String caseExecutionId, Collection<String> variableNames) The variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.getVariablesLocalTyped(String caseExecutionId) All variable values that are defined in the case execution scope, without taking outer scopes into account.getVariablesLocalTyped(String caseExecutionId, boolean deserializeValues) All variable values that are defined in the case execution scope, without taking outer scopes into account.getVariablesLocalTyped(String caseExecutionId, Collection<String> variableNames, boolean deserializeValues) The variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.getVariablesTyped(String caseExecutionId) All variables visible from the given execution scope (including parent scopes).getVariablesTyped(String caseExecutionId, boolean deserializeValues) All variables visible from the given execution scope (including parent scopes).getVariablesTyped(String caseExecutionId, Collection<String> variableNames, boolean deserializeValues) The variable values for all given variableNames, takes all variables into account which are visible from the given case execution scope (including parent scopes).<T extends TypedValue>
TgetVariableTyped(String caseExecutionId, String variableName) Searching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).<T extends TypedValue>
TgetVariableTyped(String caseExecutionId, String variableName, boolean deserializeValue) Searching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).voidmanuallyStartCaseExecution(String caseExecutionId) Starts the case execution identified by the given id manually.voidmanuallyStartCaseExecution(String caseExecutionId, Map<String, Object> variables) Starts the case execution identified by the given id manually.voidreenableCaseExecution(String caseExecutionId) Re-enables the case execution identified by the given id.voidreenableCaseExecution(String caseExecutionId, Map<String, Object> variables) Re-enables the case execution identified by the given id.voidremoveVariable(String caseExecutionId, String variableName) Pass a name of a variable to be removed from a case execution.voidremoveVariableLocal(String caseExecutionId, String variableName) Pass a variable name of a local variable to be removed from a case execution (not considering parent scopes).voidremoveVariables(String caseExecutionId, Collection<String> variableNames) Pass a collection of names identifying variables to be removed from a case execution.voidremoveVariablesLocal(String caseExecutionId, Collection<String> variableNames) Pass a collection of names identifying local variables to be removed from a case execution (not considering parent scopes).voidsetVariable(String caseExecutionId, String variableName, Object value) Pass a variable to the case execution.voidsetVariableLocal(String caseExecutionId, String variableName, Object value) Pass a local variable to the case execution (not considering parent scopes).voidsetVariables(String caseExecutionId, Map<String, Object> variables) Pass a map of variables to the case execution.voidsetVariablesLocal(String caseExecutionId, Map<String, Object> variables) Pass a map of variables to the case execution (not considering parent scopes).voidterminateCaseExecution(String caseExecutionId) Terminates the case execution identified by the given id.voidterminateCaseExecution(String caseExecutionId, Map<String, Object> variables) Terminates the case execution identified by the given id.withCaseDefinition(String caseDefinitionId) Define aCaseInstanceusing a fluent builder.withCaseDefinitionByKey(String caseDefinitionKey) Define aCaseInstanceusing a fluent builder.withCaseExecution(String caseExecutionId) Define a command to be executed for aCaseExecutionusing a fluent builder.Methods inherited from class org.camunda.bpm.engine.impl.ServiceImpl
getCommandExecutor, setCommandExecutor
-
Constructor Details
-
CaseServiceImpl
public CaseServiceImpl()
-
-
Method Details
-
withCaseDefinitionByKey
Description copied from interface:CaseServiceDefine a
CaseInstanceusing a fluent builder.Starts a new case instance with the latest version of the corresponding case definition.
- Specified by:
withCaseDefinitionByKeyin interfaceCaseService- Parameters:
caseDefinitionKey- the key of a case definition to create a new case instance of, cannot be null- Returns:
- a
fluent builderfor defining a new case instance
-
withCaseDefinition
Description copied from interface:CaseServiceDefine a
CaseInstanceusing a fluent builder.Starts a new case instance with the case definition version corresponding to the given id.
- Specified by:
withCaseDefinitionin interfaceCaseService- Parameters:
caseDefinitionId- the id of a case definition to create a new case instance, cannot be null- Returns:
- a
fluent builderfor defining a new case instance
-
createCaseInstanceQuery
Description copied from interface:CaseServiceCreates a new
CaseInstanceQueryinstance, that can be used to query case instances.- Specified by:
createCaseInstanceQueryin interfaceCaseService
-
createCaseExecutionQuery
Description copied from interface:CaseServiceCreates a new
CaseExecutionQueryinstance, that can be used to query the executions and case instances.- Specified by:
createCaseExecutionQueryin interfaceCaseService
-
withCaseExecution
Description copied from interface:CaseServiceDefine a command to be executed for a
CaseExecutionusing a fluent builder.- Specified by:
withCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of a case execution to define a command for it- Returns:
- a
fluent builderfor defining a command for a case execution
-
getVariables
Description copied from interface:CaseServiceAll variables visible from the given execution scope (including parent scopes).
If you have many local variables and you only need a few, consider using
CaseService.getVariables(String, Collection)for better performance.- Specified by:
getVariablesin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be null- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesTyped
Description copied from interface:CaseServiceAll variables visible from the given execution scope (including parent scopes).
If you have many local variables and you only need a few, consider using
CaseService.getVariables(String, Collection)for better performance.- Specified by:
getVariablesTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be null- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesTyped
Description copied from interface:CaseServiceAll variables visible from the given execution scope (including parent scopes).
If you have many local variables and you only need a few, consider using
CaseService.getVariables(String, Collection)for better performance.- Specified by:
getVariablesTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nulldeserializeValues- if false, the process engine will not attempt to deserializeSerializableValues.- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesLocal
Description copied from interface:CaseServiceAll variable values that are defined in the case execution scope, without taking outer scopes into account.
If you have many local variables and you only need a few, consider using
CaseService.getVariablesLocal(String, Collection)for better performance.- Specified by:
getVariablesLocalin interfaceCaseService- Parameters:
caseExecutionId- the id of a case execution, cannot be null- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesLocalTyped
Description copied from interface:CaseServiceAll variable values that are defined in the case execution scope, without taking outer scopes into account.
If you have many local variables and you only need a few, consider using
CaseService.getVariablesLocal(String, Collection)for better performance.- Specified by:
getVariablesLocalTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case execution, cannot be null- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesLocalTyped
Description copied from interface:CaseServiceAll variable values that are defined in the case execution scope, without taking outer scopes into account.
If you have many local variables and you only need a few, consider using
CaseService.getVariablesLocal(String, Collection)for better performance.- Specified by:
getVariablesLocalTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case execution, cannot be nulldeserializeValues- if false, the process engine will not attempt to deserializeSerializableValues.- Returns:
- the variables or an empty map if no such variables are found
-
getVariables
Description copied from interface:CaseServiceThe variable values for all given variableNames, takes all variables into account which are visible from the given case execution scope (including parent scopes).
- Specified by:
getVariablesin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableNames- the collection of variable names that should be retrieved- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesTyped
public VariableMap getVariablesTyped(String caseExecutionId, Collection<String> variableNames, boolean deserializeValues) Description copied from interface:CaseServiceThe variable values for all given variableNames, takes all variables into account which are visible from the given case execution scope (including parent scopes).
- Specified by:
getVariablesTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableNames- the collection of variable names that should be retrieveddeserializeValues- if false,SerializableValueswill not be deserialized- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesLocal
Description copied from interface:CaseServiceThe variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.
- Specified by:
getVariablesLocalin interfaceCaseService- Parameters:
caseExecutionId- the id of a case execution, cannot be nullvariableNames- the collection of variable names that should be retrieved- Returns:
- the variables or an empty map if no such variables are found
-
getVariablesLocalTyped
public VariableMap getVariablesLocalTyped(String caseExecutionId, Collection<String> variableNames, boolean deserializeValues) Description copied from interface:CaseServiceThe variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.
- Specified by:
getVariablesLocalTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case execution, cannot be nullvariableNames- the collection of variable names that should be retrieveddeserializeValues- if false, the process engine will not attempt to deserializeSerializableValues.- Returns:
- the variables or an empty map if no such variables are found
-
getCaseExecutionVariables
protected VariableMap getCaseExecutionVariables(String caseExecutionId, Collection<String> variableNames, boolean isLocal, boolean deserializeValues) -
getVariable
Description copied from interface:CaseServiceSearching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).
Returns null when no variable value is found with the given name or when the value is set to null.
- Specified by:
getVariablein interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableName- the name of a variable, cannot be null- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
-
getVariableLocal
Description copied from interface:CaseServiceThe variable value for an case execution. Returns the value when the variable is set for the case execution (and not searching parent scopes).
Returns null when no variable value is found with the given name or when the value is set to null.
- Specified by:
getVariableLocalin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableName- the name of a variable, cannot be null- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
-
getCaseExecutionVariable
-
getVariableTyped
Description copied from interface:CaseServiceSearching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).
Returns null when no variable value is found with the given name or when the value is set to null.
- Specified by:
getVariableTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableName- the name of a variable, cannot be null- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
-
getVariableTyped
public <T extends TypedValue> T getVariableTyped(String caseExecutionId, String variableName, boolean deserializeValue) Description copied from interface:CaseServiceSearching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).
Returns null when no variable value is found with the given name or when the value is set to null.
- Specified by:
getVariableTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableName- the name of a variable, cannot be nulldeserializeValue- if false,SerializableValueswill not be deserialized- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
-
getVariableLocalTyped
Description copied from interface:CaseServiceThe variable value for an case execution. Returns the value when the variable is set for the case execution (and not searching parent scopes).
Returns null when no variable value is found with the given name or when the value is set to null.
- Specified by:
getVariableLocalTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableName- the name of a variable, cannot be null- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
-
getVariableLocalTyped
public <T extends TypedValue> T getVariableLocalTyped(String caseExecutionId, String variableName, boolean deserializeValue) Description copied from interface:CaseServiceThe variable value for an case execution. Returns the value when the variable is set for the case execution (and not searching parent scopes).
Returns null when no variable value is found with the given name or when the value is set to null.
- Specified by:
getVariableLocalTypedin interfaceCaseService- Parameters:
caseExecutionId- the id of a case instance or case execution, cannot be nullvariableName- the name of a variable, cannot be nulldeserializeValue- if false,SerializableValueswill not be deserialized- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
-
getCaseExecutionVariableTyped
protected <T extends TypedValue> T getCaseExecutionVariableTyped(String caseExecutionId, String variableName, boolean isLocal, boolean deserializeValue) -
setVariables
Description copied from interface:CaseServicePass a map of variables to the case execution. If the variables do not already exist, they are created in the case instance (which is the root execution). Otherwise existing variables are updated.
- Specified by:
setVariablesin interfaceCaseService- Parameters:
caseExecutionId- the case execution to set the variables forvariables- the map of variables
-
setVariablesLocal
Description copied from interface:CaseServicePass a map of variables to the case execution (not considering parent scopes).
- Specified by:
setVariablesLocalin interfaceCaseService- Parameters:
caseExecutionId- the case execution to set the variables forvariables- the map of variables
-
setVariable
Description copied from interface:CaseServicePass a variable to the case execution. If the variable does not already exist, it is created in the case instance (which is the root execution). Otherwise, the existing variable is updated.
- Specified by:
setVariablein interfaceCaseService- Parameters:
caseExecutionId- the case execution to set the variable forvariableName- the name of the variable to setvalue- the value of the variable to set
-
setVariableLocal
Description copied from interface:CaseServicePass a local variable to the case execution (not considering parent scopes).
- Specified by:
setVariableLocalin interfaceCaseService- Parameters:
caseExecutionId- the case execution to set the variable forvariableName- the name of the variable to setvalue- the value of the variable to set
-
removeVariables
Description copied from interface:CaseServicePass a collection of names identifying variables to be removed from a case execution.
- Specified by:
removeVariablesin interfaceCaseService- Parameters:
caseExecutionId- the case execution to remove the variables fromvariableNames- a collection of names of variables to remove
-
removeVariablesLocal
Description copied from interface:CaseServicePass a collection of names identifying local variables to be removed from a case execution (not considering parent scopes).
- Specified by:
removeVariablesLocalin interfaceCaseService- Parameters:
caseExecutionId- the case execution to remove the variables fromvariableNames- a collection of names of variables to remove
-
removeVariable
Description copied from interface:CaseServicePass a name of a variable to be removed from a case execution.
- Specified by:
removeVariablein interfaceCaseService- Parameters:
caseExecutionId- the case execution to remove the variable fromvariableName- the name of the variable to remove
-
removeVariableLocal
Description copied from interface:CaseServicePass a variable name of a local variable to be removed from a case execution (not considering parent scopes).
- Specified by:
removeVariableLocalin interfaceCaseService- Parameters:
caseExecutionId- the case execution to remove the variable fromvariableName- the name of a variable to remove
-
createCaseInstanceByKey
Description copied from interface:CaseServiceCreates a new
CaseInstanceof the latest version of the case definition with the given key. The new case instance will be in theACTIVEstate.- Specified by:
createCaseInstanceByKeyin interfaceCaseService- Parameters:
caseDefinitionKey- the key of the case definition to instantiate
-
createCaseInstanceByKey
Description copied from interface:CaseServiceCreates a new
CaseInstanceof the latest version of the case definition with the given key. The new case instance will be in theACTIVEstate.A business key can be provided to associate the case instance with a certain identifier that has a clear business meaning. This business key can then be used to easily look up that case instance, see
CaseInstanceQuery.caseInstanceBusinessKey(String). Providing such a business key is definitely a best practice.Note that a business key MUST be unique for the given case definition WHEN you have added a database constraint for it. In this case, only case instance from different case definition are allowed to have the same business key and the combination of caseDefinitionKey-businessKey must be unique.
- Specified by:
createCaseInstanceByKeyin interfaceCaseService- Parameters:
caseDefinitionKey- the key of the case definition to instantiatebusinessKey- a key that uniquely identifies the case instance in the context of the given case definition.
-
createCaseInstanceByKey
Description copied from interface:CaseServiceCreates a new
CaseInstanceof the latest version of the case definition with the given key. The new case instance will be in theACTIVEstate.- Specified by:
createCaseInstanceByKeyin interfaceCaseService- Parameters:
caseDefinitionKey- the key of the case definition to instantiatevariables- variables to be set on the new case instance
-
createCaseInstanceByKey
public CaseInstance createCaseInstanceByKey(String caseDefinitionKey, String businessKey, Map<String, Object> variables) Description copied from interface:CaseServiceCreates a new
CaseInstanceof the latest version of the case definition with the given key. The new case instance will be in theACTIVEstate.A business key can be provided to associate the case instance with a certain identifier that has a clear business meaning. This business key can then be used to easily look up that case instance, see
CaseInstanceQuery.caseInstanceBusinessKey(String). Providing such a business key is definitely a best practice.Note that a business key MUST be unique for the given case definition WHEN you have added a database constraint for it. In this case, only case instance from different case definition are allowed to have the same business key and the combination of caseDefinitionKey-businessKey must be unique.
- Specified by:
createCaseInstanceByKeyin interfaceCaseService- Parameters:
caseDefinitionKey- the key of the case definition to instantiate.businessKey- a key that uniquely identifies the case instance in the context of the given case definition.variables- variables to be set on the new case instance.
-
createCaseInstanceById
Description copied from interface:CaseServiceCreates a new
CaseInstancein the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVEstate.- Specified by:
createCaseInstanceByIdin interfaceCaseService- Parameters:
caseDefinitionId- the id of the case definition to instantiate
-
createCaseInstanceById
Description copied from interface:CaseServiceCreates a new
CaseInstancein the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVEstate.A business key can be provided to associate the case instance with a certain identifier that has a clear business meaning. This business key can then be used to easily look up that case instance, see
CaseInstanceQuery.caseInstanceBusinessKey(String). Providing such a business key is definitely a best practice.Note that a business key MUST be unique for the given case definition WHEN you have added a database constraint for it. In this case, only case instance from different case definition are allowed to have the same business key and the combination of caseDefinitionKey-businessKey must be unique.
- Specified by:
createCaseInstanceByIdin interfaceCaseService- Parameters:
caseDefinitionId- the id of the case definition to instantiatebusinessKey- a key that uniquely identifies the case instance in the context of the given case definition.
-
createCaseInstanceById
Description copied from interface:CaseServiceCreates a new
CaseInstancein the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVEstate.- Specified by:
createCaseInstanceByIdin interfaceCaseService- Parameters:
caseDefinitionId- the id of the case definition to instantiatevariables- variables to be set on the new case instance.
-
createCaseInstanceById
public CaseInstance createCaseInstanceById(String caseDefinitionId, String businessKey, Map<String, Object> variables) Description copied from interface:CaseServiceCreates a new
CaseInstancein the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVEstate.A business key can be provided to associate the case instance with a certain identifier that has a clear business meaning. This business key can then be used to easily look up that case instance, see
CaseInstanceQuery.caseInstanceBusinessKey(String). Providing such a business key is definitely a best practice.Note that a business key MUST be unique for the given case definition WHEN you have added a database constraint for it. In this case, only case instance from different case definition are allowed to have the same business key and the combination of caseDefinitionKey-businessKey must be unique.
- Specified by:
createCaseInstanceByIdin interfaceCaseService- Parameters:
caseDefinitionId- the id of the case definition to instantiatebusinessKey- a key that uniquely identifies the case instance in the context of the given case definition.variables- variables to be set on the new case instance.
-
manuallyStartCaseExecution
Description copied from interface:CaseServiceStarts the case execution identified by the given id manually. Performs the transition from state
ENABLEDto stateACTIVE.According to CMMN 1.0 specification, the state
ACTIVEmeans that theStageorTaskrelated to the case execution does the following:Task: thetaskis completed immediatelyHumanTask: a newuser taskis instantiatedProcessTask: a newprocess instanceis instantiatedCaseTask: a newcase instanceis instantiated
- Specified by:
manuallyStartCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to manually start
-
manuallyStartCaseExecution
Description copied from interface:CaseServiceStarts the case execution identified by the given id manually. Performs a transition from state
ENABLEDto stateACTIVE.According to CMMN 1.0 specification, the state
ACTIVEmeans that theStageorTaskrelated to the case execution does the following:Task: thetaskis completed immediatelyHumanTask: a newuser taskis instantiatedProcessTask: a newprocess instanceis instantiatedCaseTask: a newcase instanceis instantiated
- Specified by:
manuallyStartCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to manually startvariables- variables to be set on the case execution
-
disableCaseExecution
Description copied from interface:CaseServiceDisables the case execution identified by the given id. Performs a transition from state
ENABLEDto stateDISABLED.According to CMMN 1.0 specification, the state
DISABLEDmeans that theStageorTaskrelated to the case execution should not be executed in this 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:
disableCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to disable
-
disableCaseExecution
Description copied from interface:CaseServiceDisables the case execution identified by the given id. Performs a transition from state
ENABLEDto stateDISABLED.According to CMMN 1.0 specification, the state
DISABLEDmeans that theStageorTaskrelated to the case execution should not be executed in this 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:
disableCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to disablevariables- variables to be set on the case execution
-
reenableCaseExecution
Description copied from interface:CaseServiceRe-enables the case execution identified by the given id. Performs a transition from state
DISABLEDto stateENABLED.According to CMMN 1.0 specification, the state
DISABLEDmeans that theStageorTaskrelated to the case execution pends for a decision to becomeACTIVEorDISABLED.- Specified by:
reenableCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to re-enable
-
reenableCaseExecution
Description copied from interface:CaseServiceRe-enables the case execution identified by the given id. Performs a transition from state
DISABLEDto stateENABLED.According to CMMN 1.0 specification, the state
DISABLEDmeans that theStageorTaskrelated to the case execution pends for a decision to becomeACTIVEorDISABLED.- Specified by:
reenableCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to re-enablevariables- variables to be set on the case execution
-
completeCaseExecution
Description copied from interface:CaseServiceCompletes the case execution identified by the given id. Performs a transition from state
ACTIVEto stateCOMPLETED.It is only possible to complete a case execution which is associated with a
StageorTask.In case of a
Stage, the 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:
completeCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to complete
- there are no children in the state
-
completeCaseExecution
Description copied from interface:CaseServiceCompletes the case execution identified by the given id. Performs a transition from state
ACTIVEto stateCOMPLETED.It is only possible to complete a case execution which is associated with a
StageorTask.In case of a
Stage, the 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:
completeCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to completevariables- variables to be set on the case execution
- there are no children in the state
-
closeCaseInstance
Description copied from interface:CaseServiceCloses the case instance the execution identified by the given id belongs to. Once closed, no further work or modifications are allowed for the case instance. Performs a transition from state
COMPLETEDto stateCLOSED.- Specified by:
closeCaseInstancein interfaceCaseService- Parameters:
caseInstanceId- the id of the case execution to close the case instance for
-
terminateCaseExecution
Description copied from interface:CaseServiceTerminates the case execution identified by the given id. Performs the transition from
ACTIVEto stateTERMINATEDif the case execution belongs to a case model or a task or a stage. Performs the transition fromAVAILABLEto stateTERMINATEDif the case execution belongs to a milestone.- Specified by:
terminateCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to be terminated
-
terminateCaseExecution
Description copied from interface:CaseServiceTerminates the case execution identified by the given id. Performs the transition from
ACTIVEto stateTERMINATEDif the case execution belongs to either a case model or a task or a stage. Performs the transition fromAVAILABLEto stateTERMINATEDif the case execution belongs to a milestone.- Specified by:
terminateCaseExecutionin interfaceCaseService- Parameters:
caseExecutionId- the id of the case execution to terminatevariables- variables to be set on the case execution
-