Interface CaseService
-
- All Known Implementing Classes:
CaseServiceImpl
public interface CaseService
Service which provides access tocase instances
andcase executions
.- Since:
- 7.2
- Author:
- Roman Smirnov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeCaseInstance(java.lang.String caseExecutionId)
Closes the case instance the execution identified by the given id belongs to.void
completeCaseExecution(java.lang.String caseExecutionId)
Completes the case execution identified by the given id.void
completeCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Completes the case execution identified by the given id.CaseExecutionQuery
createCaseExecutionQuery()
Creates a newCaseExecutionQuery
instance, that can be used to query the executions and case instances.CaseInstance
createCaseInstanceById(java.lang.String caseDefinitionId)
Creates a newCaseInstance
in the exactly specified version identify by the provided process definition id.CaseInstance
createCaseInstanceById(java.lang.String caseDefinitionId, java.lang.String businessKey)
Creates a newCaseInstance
in the exactly specified version identify by the provided process definition id.CaseInstance
createCaseInstanceById(java.lang.String caseDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a newCaseInstance
in the exactly specified version identify by the provided process definition id.CaseInstance
createCaseInstanceById(java.lang.String caseDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a newCaseInstance
in the exactly specified version identify by the provided process definition id.CaseInstance
createCaseInstanceByKey(java.lang.String caseDefinitionKey)
Creates a newCaseInstance
of the latest version of the case definition with the given key.CaseInstance
createCaseInstanceByKey(java.lang.String caseDefinitionKey, java.lang.String businessKey)
Creates a newCaseInstance
of the latest version of the case definition with the given key.CaseInstance
createCaseInstanceByKey(java.lang.String caseDefinitionKey, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a newCaseInstance
of the latest version of the case definition with the given key.CaseInstance
createCaseInstanceByKey(java.lang.String caseDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a newCaseInstance
of the latest version of the case definition with the given key.CaseInstanceQuery
createCaseInstanceQuery()
Creates a newCaseInstanceQuery
instance, that can be used to query case instances.void
disableCaseExecution(java.lang.String caseExecutionId)
Disables the case execution identified by the given id.void
disableCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Disables the case execution identified by the given id.java.lang.Object
getVariable(java.lang.String caseExecutionId, java.lang.String variableName)
Searching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).java.lang.Object
getVariableLocal(java.lang.String caseExecutionId, java.lang.String variableName)
The variable value for an case execution.<T extends TypedValue>
TgetVariableLocalTyped(java.lang.String caseExecutionId, java.lang.String variableName)
The variable value for an case execution.<T extends TypedValue>
TgetVariableLocalTyped(java.lang.String caseExecutionId, java.lang.String variableName, boolean deserializeValue)
The variable value for an case execution.java.util.Map<java.lang.String,java.lang.Object>
getVariables(java.lang.String caseExecutionId)
All variables visible from the given execution scope (including parent scopes).java.util.Map<java.lang.String,java.lang.Object>
getVariables(java.lang.String caseExecutionId, java.util.Collection<java.lang.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).java.util.Map<java.lang.String,java.lang.Object>
getVariablesLocal(java.lang.String caseExecutionId)
All variable values that are defined in the case execution scope, without taking outer scopes into account.java.util.Map<java.lang.String,java.lang.Object>
getVariablesLocal(java.lang.String caseExecutionId, java.util.Collection<java.lang.String> variableNames)
The variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.VariableMap
getVariablesLocalTyped(java.lang.String caseExecutionId)
All variable values that are defined in the case execution scope, without taking outer scopes into account.VariableMap
getVariablesLocalTyped(java.lang.String caseExecutionId, boolean deserializeValues)
All variable values that are defined in the case execution scope, without taking outer scopes into account.VariableMap
getVariablesLocalTyped(java.lang.String caseExecutionId, java.util.Collection<java.lang.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.VariableMap
getVariablesTyped(java.lang.String caseExecutionId)
All variables visible from the given execution scope (including parent scopes).VariableMap
getVariablesTyped(java.lang.String caseExecutionId, boolean deserializeValues)
All variables visible from the given execution scope (including parent scopes).VariableMap
getVariablesTyped(java.lang.String caseExecutionId, java.util.Collection<java.lang.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(java.lang.String caseExecutionId, java.lang.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(java.lang.String caseExecutionId, java.lang.String variableName, boolean deserializeValue)
Searching for the variable is done in all scopes that are visible to the given case execution (including parent scopes).void
manuallyStartCaseExecution(java.lang.String caseExecutionId)
Starts the case execution identified by the given id manually.void
manuallyStartCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Starts the case execution identified by the given id manually.void
reenableCaseExecution(java.lang.String caseExecutionId)
Re-enables the case execution identified by the given id.void
reenableCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Re-enables the case execution identified by the given id.void
removeVariable(java.lang.String caseExecutionId, java.lang.String variableName)
Pass a name of a variable to be removed from a case execution.void
removeVariableLocal(java.lang.String caseExecutionId, java.lang.String variableName)
Pass a variable name of a local variable to be removed from a case execution (not considering parent scopes).void
removeVariables(java.lang.String caseExecutionId, java.util.Collection<java.lang.String> variableNames)
Pass a collection of names identifying variables to be removed from a case execution.void
removeVariablesLocal(java.lang.String caseExecutionId, java.util.Collection<java.lang.String> variableNames)
Pass a collection of names identifying local variables to be removed from a case execution (not considering parent scopes).void
setVariable(java.lang.String caseExecutionId, java.lang.String variableName, java.lang.Object variableValue)
Pass a variable to the case execution.void
setVariableLocal(java.lang.String caseExecutionId, java.lang.String variableName, java.lang.Object variableValue)
Pass a local variable to the case execution (not considering parent scopes).void
setVariables(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Pass a map of variables to the case execution.void
setVariablesLocal(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Pass a map of variables to the case execution (not considering parent scopes).void
terminateCaseExecution(java.lang.String caseExecutionId)
Terminates the case execution identified by the given id.void
terminateCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Terminates the case execution identified by the given id.CaseInstanceBuilder
withCaseDefinition(java.lang.String caseDefinitionId)
Define aCaseInstance
using a fluent builder.CaseInstanceBuilder
withCaseDefinitionByKey(java.lang.String caseDefinitionKey)
Define aCaseInstance
using a fluent builder.CaseExecutionCommandBuilder
withCaseExecution(java.lang.String caseExecutionId)
Define a command to be executed for aCaseExecution
using a fluent builder.
-
-
-
Method Detail
-
createCaseInstanceByKey
CaseInstance createCaseInstanceByKey(java.lang.String caseDefinitionKey)
Creates a new
CaseInstance
of the latest version of the case definition with the given key. The new case instance will be in theACTIVE
state.- Parameters:
caseDefinitionKey
- the key of the case definition to instantiate- Throws:
NotValidException
- when the given case definition key is null.NotFoundException
- when no case definition is deployed with the given key.ProcessEngineException
- when an internal exception happens during the execution of the command
-
createCaseInstanceByKey
CaseInstance createCaseInstanceByKey(java.lang.String caseDefinitionKey, java.lang.String businessKey)
Creates a new
CaseInstance
of the latest version of the case definition with the given key. The new case instance will be in theACTIVE
state.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.
- 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.- Throws:
NotValidException
- when the given case definition key is null.NotFoundException
- when no case definition is deployed with the given key.ProcessEngineException
- when an internal exception happens during the execution of the command
-
createCaseInstanceByKey
CaseInstance createCaseInstanceByKey(java.lang.String caseDefinitionKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a new
CaseInstance
of the latest version of the case definition with the given key. The new case instance will be in theACTIVE
state.- Parameters:
caseDefinitionKey
- the key of the case definition to instantiatevariables
- variables to be set on the new case instance- Throws:
NotValidException
- when the given case definition key is null.NotFoundException
- when no case definition is deployed with the given key.ProcessEngineException
- when an internal exception happens during the execution of the command
-
createCaseInstanceByKey
CaseInstance createCaseInstanceByKey(java.lang.String caseDefinitionKey, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a new
CaseInstance
of the latest version of the case definition with the given key. The new case instance will be in theACTIVE
state.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.
- 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.- Throws:
NotValidException
- when the given case definition key is null.NotFoundException
- when no case definition is deployed with the given key.ProcessEngineException
- when an internal exception happens during the execution of the command
-
createCaseInstanceById
CaseInstance createCaseInstanceById(java.lang.String caseDefinitionId)
Creates a new
CaseInstance
in the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVE
state.- Parameters:
caseDefinitionId
- the id of the case definition to instantiate- Throws:
NotValidException
- when the given case definition id is null.NotFoundException
- when no case definition is deployed with the given id.ProcessEngineException
- when an internal exception happens during the execution of the command
-
createCaseInstanceById
CaseInstance createCaseInstanceById(java.lang.String caseDefinitionId, java.lang.String businessKey)
Creates a new
CaseInstance
in the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVE
state.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.
- 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.- Throws:
NotValidException
- when the given case definition id is null.NotFoundException
- when no case definition is deployed with the given id.ProcessEngineException
- when an internal exception happens during the execution of the command
-
createCaseInstanceById
CaseInstance createCaseInstanceById(java.lang.String caseDefinitionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a new
CaseInstance
in the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVE
state.- Parameters:
caseDefinitionId
- the id of the case definition to instantiatevariables
- variables to be set on the new case instance.- Throws:
NotValidException
- when the given case definition id is null.NotFoundException
- when no case definition is deployed with the given id.ProcessEngineException
- when an internal exception happens during the execution of the command
-
createCaseInstanceById
CaseInstance createCaseInstanceById(java.lang.String caseDefinitionId, java.lang.String businessKey, java.util.Map<java.lang.String,java.lang.Object> variables)
Creates a new
CaseInstance
in the exactly specified version identify by the provided process definition id. The new case instance will be in theACTIVE
state.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.
- 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.- Throws:
NotValidException
- when the given case definition id is null.NotFoundException
- when no case definition is deployed with the given id.ProcessEngineException
- when an internal exception happens during the execution of the command
-
manuallyStartCaseExecution
void manuallyStartCaseExecution(java.lang.String caseExecutionId)
Starts the case execution identified by the given id manually. Performs the transition from state
ENABLED
to stateACTIVE
.According to CMMN 1.0 specification, the state
ACTIVE
means that theStage
orTask
related to the case execution does the following:Task
: thetask
is completed immediatelyHumanTask
: a newuser task
is instantiatedProcessTask
: a newprocess instance
is instantiatedCaseTask
: a newcase instance
is instantiated
- Parameters:
caseExecutionId
- the id of the case execution to manually start- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be done or when the case execution is a case instanceProcessEngineException
- when an internal exception happens during the execution of the command.
-
manuallyStartCaseExecution
void manuallyStartCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Starts the case execution identified by the given id manually. Performs a transition from state
ENABLED
to stateACTIVE
.According to CMMN 1.0 specification, the state
ACTIVE
means that theStage
orTask
related to the case execution does the following:Task
: thetask
is completed immediatelyHumanTask
: a newuser task
is instantiatedProcessTask
: a newprocess instance
is instantiatedCaseTask
: a newcase instance
is instantiated
- Parameters:
caseExecutionId
- the id of the case execution to manually startvariables
- variables to be set on the case execution- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be done or when the case execution is a case instanceProcessEngineException
- when an internal exception happens during the execution of the command.
-
disableCaseExecution
void disableCaseExecution(java.lang.String caseExecutionId)
Disables the case execution identified by the given id. Performs a transition from state
ENABLED
to stateDISABLED
.According to CMMN 1.0 specification, the state
DISABLED
means that theStage
orTask
related 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.
- Parameters:
caseExecutionId
- the id of the case execution to disable- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be done or when the case execution is a case instanceProcessEngineException
- when an internal exception happens during the execution of the command.
-
disableCaseExecution
void disableCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Disables the case execution identified by the given id. Performs a transition from state
ENABLED
to stateDISABLED
.According to CMMN 1.0 specification, the state
DISABLED
means that theStage
orTask
related 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.
- Parameters:
caseExecutionId
- the id of the case execution to disablevariables
- variables to be set on the case execution- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be done or when the case execution is a case instanceProcessEngineException
- when an internal exception happens during the execution of the command.
-
reenableCaseExecution
void reenableCaseExecution(java.lang.String caseExecutionId)
Re-enables the case execution identified by the given id. Performs a transition from state
DISABLED
to stateENABLED
.According to CMMN 1.0 specification, the state
DISABLED
means that theStage
orTask
related to the case execution pends for a decision to becomeACTIVE
orDISABLED
.- Parameters:
caseExecutionId
- the id of the case execution to re-enable- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be done or when the case execution is a case instanceProcessEngineException
- when an internal exception happens during the execution of the command.
-
reenableCaseExecution
void reenableCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Re-enables the case execution identified by the given id. Performs a transition from state
DISABLED
to stateENABLED
.According to CMMN 1.0 specification, the state
DISABLED
means that theStage
orTask
related to the case execution pends for a decision to becomeACTIVE
orDISABLED
.- Parameters:
caseExecutionId
- the id of the case execution to re-enablevariables
- variables to be set on the case execution- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be done or when the case execution is a case instanceProcessEngineException
- when an internal exception happens during the execution of the command.
-
completeCaseExecution
void completeCaseExecution(java.lang.String caseExecutionId)
Completes the case execution identified by the given id. Performs a transition from state
ACTIVE
to stateCOMPLETED
.It is only possible to complete a case execution which is associated with a
Stage
orTask
.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
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.
- Parameters:
caseExecutionId
- the id of the case execution to complete- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be doneProcessEngineException
- when an internal exception happens during the execution of the command.
- there are no children in the state
-
completeCaseExecution
void completeCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Completes the case execution identified by the given id. Performs a transition from state
ACTIVE
to stateCOMPLETED
.It is only possible to complete a case execution which is associated with a
Stage
orTask
.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
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.
- Parameters:
caseExecutionId
- the id of the case execution to completevariables
- variables to be set on the case execution- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be doneProcessEngineException
- when an internal exception happens during the execution of the command.
- there are no children in the state
-
closeCaseInstance
void closeCaseInstance(java.lang.String caseExecutionId)
Closes 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
COMPLETED
to stateCLOSED
.- Parameters:
caseExecutionId
- the id of the case execution to close the case instance for- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be doneProcessEngineException
- when an internal exception happens during the execution of the command.
-
terminateCaseExecution
void terminateCaseExecution(java.lang.String caseExecutionId)
Terminates the case execution identified by the given id. Performs the transition from
ACTIVE
to stateTERMINATED
if the case execution belongs to a case model or a task or a stage. Performs the transition fromAVAILABLE
to stateTERMINATED
if the case execution belongs to a milestone.- Parameters:
caseExecutionId
- the id of the case execution to be terminated- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be doneProcessEngineException
- when an internal exception happens during the execution of the command.
-
terminateCaseExecution
void terminateCaseExecution(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Terminates the case execution identified by the given id. Performs the transition from
ACTIVE
to stateTERMINATED
if the case execution belongs to either a case model or a task or a stage. Performs the transition fromAVAILABLE
to stateTERMINATED
if the case execution belongs to a milestone.- Parameters:
caseExecutionId
- the id of the case execution to terminatevariables
- variables to be set on the case execution- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idNotAllowedException
- when the transition is not allowed to be doneProcessEngineException
- when an internal exception happens during the execution of the command.
-
withCaseDefinitionByKey
CaseInstanceBuilder withCaseDefinitionByKey(java.lang.String caseDefinitionKey)
Define a
CaseInstance
using a fluent builder.Starts a new case instance with the latest version of the corresponding case definition.
- Parameters:
caseDefinitionKey
- the key of a case definition to create a new case instance of, cannot be null- Returns:
- a
fluent builder
for defining a new case instance
-
withCaseDefinition
CaseInstanceBuilder withCaseDefinition(java.lang.String caseDefinitionId)
Define a
CaseInstance
using a fluent builder.Starts a new case instance with the case definition version corresponding to the given id.
- Parameters:
caseDefinitionId
- the id of a case definition to create a new case instance, cannot be null- Returns:
- a
fluent builder
for defining a new case instance
-
withCaseExecution
CaseExecutionCommandBuilder withCaseExecution(java.lang.String caseExecutionId)
Define a command to be executed for a
CaseExecution
using a fluent builder.- Parameters:
caseExecutionId
- the id of a case execution to define a command for it- Returns:
- a
fluent builder
for defining a command for a case execution
-
createCaseInstanceQuery
CaseInstanceQuery createCaseInstanceQuery()
Creates a new
CaseInstanceQuery
instance, that can be used to query case instances.
-
createCaseExecutionQuery
CaseExecutionQuery createCaseExecutionQuery()
Creates a new
CaseExecutionQuery
instance, that can be used to query the executions and case instances.
-
getVariables
java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String caseExecutionId)
All variables visible from the given execution scope (including parent scopes).
If you have many local variables and you only need a few, consider using
getVariables(String, Collection)
for better performance.- 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
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesTyped
VariableMap getVariablesTyped(java.lang.String caseExecutionId)
All variables visible from the given execution scope (including parent scopes).
If you have many local variables and you only need a few, consider using
getVariables(String, Collection)
for better performance.- 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
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesTyped
VariableMap getVariablesTyped(java.lang.String caseExecutionId, boolean deserializeValues)
All variables visible from the given execution scope (including parent scopes).
If you have many local variables and you only need a few, consider using
getVariables(String, Collection)
for better performance.- 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
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesLocal
java.util.Map<java.lang.String,java.lang.Object> getVariablesLocal(java.lang.String caseExecutionId)
All 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
getVariablesLocal(String, Collection)
for better performance.- Parameters:
caseExecutionId
- the id of a case execution, cannot be null- Returns:
- the variables or an empty map if no such variables are found
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesLocalTyped
VariableMap getVariablesLocalTyped(java.lang.String caseExecutionId)
All 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
getVariablesLocal(String, Collection)
for better performance.- Parameters:
caseExecutionId
- the id of a case execution, cannot be null- Returns:
- the variables or an empty map if no such variables are found
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesLocalTyped
VariableMap getVariablesLocalTyped(java.lang.String caseExecutionId, boolean deserializeValues)
All 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
getVariablesLocal(String, Collection)
for better performance.- 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
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariables
java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String caseExecutionId, java.util.Collection<java.lang.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).
- 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
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesTyped
VariableMap getVariablesTyped(java.lang.String caseExecutionId, java.util.Collection<java.lang.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).
- 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,SerializableValues
will not be deserialized- Returns:
- the variables or an empty map if no such variables are found
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesLocal
java.util.Map<java.lang.String,java.lang.Object> getVariablesLocal(java.lang.String caseExecutionId, java.util.Collection<java.lang.String> variableNames)
The variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.
- 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
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariablesLocalTyped
VariableMap getVariablesLocalTyped(java.lang.String caseExecutionId, java.util.Collection<java.lang.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.
- 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
- Throws:
NotValidException
- when the given case execution id is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariable
java.lang.Object getVariable(java.lang.String caseExecutionId, java.lang.String variableName)
Searching 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.
- 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
- Throws:
NotValidException
- when the given case execution id or variable name is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariableTyped
<T extends TypedValue> T getVariableTyped(java.lang.String caseExecutionId, java.lang.String variableName)
Searching 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.
- 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
- Throws:
NotValidException
- when the given case execution id or variable name is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariableTyped
<T extends TypedValue> T getVariableTyped(java.lang.String caseExecutionId, java.lang.String variableName, boolean deserializeValue)
Searching 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.
- Parameters:
caseExecutionId
- the id of a case instance or case execution, cannot be nullvariableName
- the name of a variable, cannot be nulldeserializeValue
- if false,SerializableValues
will not be deserialized- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
- Throws:
NotValidException
- when the given case execution id or variable name is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariableLocal
java.lang.Object getVariableLocal(java.lang.String caseExecutionId, java.lang.String variableName)
The 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.
- 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
- Throws:
NotValidException
- when the given case execution id or variable name is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariableLocalTyped
<T extends TypedValue> T getVariableLocalTyped(java.lang.String caseExecutionId, java.lang.String variableName)
The 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.
- 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
- Throws:
NotValidException
- when the given case execution id or variable name is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
getVariableLocalTyped
<T extends TypedValue> T getVariableLocalTyped(java.lang.String caseExecutionId, java.lang.String variableName, boolean deserializeValue)
The 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.
- Parameters:
caseExecutionId
- the id of a case instance or case execution, cannot be nullvariableName
- the name of a variable, cannot be nulldeserializeValue
- if false,SerializableValues
will not be deserialized- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null
- Throws:
NotValidException
- when the given case execution id or variable name is nullNotFoundException
- when no case execution is found for the given case execution idProcessEngineException
- when an internal exception happens during the execution of the command
-
setVariables
void setVariables(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Pass 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.
- Parameters:
caseExecutionId
- the case execution to set the variables forvariables
- the map of variables
-
setVariablesLocal
void setVariablesLocal(java.lang.String caseExecutionId, java.util.Map<java.lang.String,java.lang.Object> variables)
Pass a map of variables to the case execution (not considering parent scopes).
- Parameters:
caseExecutionId
- the case execution to set the variables forvariables
- the map of variables
-
setVariable
void setVariable(java.lang.String caseExecutionId, java.lang.String variableName, java.lang.Object variableValue)
Pass 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.
- Parameters:
caseExecutionId
- the case execution to set the variable forvariableName
- the name of the variable to setvariableValue
- the value of the variable to set- Throws:
NotValidException
- when the given variable name is null
-
setVariableLocal
void setVariableLocal(java.lang.String caseExecutionId, java.lang.String variableName, java.lang.Object variableValue)
Pass a local variable to the case execution (not considering parent scopes).
- Parameters:
caseExecutionId
- the case execution to set the variable forvariableName
- the name of the variable to setvariableValue
- the value of the variable to set- Throws:
NotValidException
- when the given variable name is null
-
removeVariables
void removeVariables(java.lang.String caseExecutionId, java.util.Collection<java.lang.String> variableNames)
Pass a collection of names identifying variables to be removed from a case execution.
- Parameters:
caseExecutionId
- the case execution to remove the variables fromvariableNames
- a collection of names of variables to remove
-
removeVariablesLocal
void removeVariablesLocal(java.lang.String caseExecutionId, java.util.Collection<java.lang.String> variableNames)
Pass a collection of names identifying local variables to be removed from a case execution (not considering parent scopes).
- Parameters:
caseExecutionId
- the case execution to remove the variables fromvariableNames
- a collection of names of variables to remove
-
removeVariable
void removeVariable(java.lang.String caseExecutionId, java.lang.String variableName)
Pass a name of a variable to be removed from a case execution.
- Parameters:
caseExecutionId
- the case execution to remove the variable fromvariableName
- the name of the variable to remove- Throws:
NotValidException
- when the given variable name is null
-
removeVariableLocal
void removeVariableLocal(java.lang.String caseExecutionId, java.lang.String variableName)
Pass a variable name of a local variable to be removed from a case execution (not considering parent scopes).
- Parameters:
caseExecutionId
- the case execution to remove the variable fromvariableName
- the name of a variable to remove- Throws:
NotValidException
- when the given variable name is null
-
-