public class CaseServiceImpl extends ServiceImpl implements CaseService
commandExecutor
Constructor and Description |
---|
CaseServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
closeCaseInstance(String caseInstanceId)
Closes the case instance the execution identified by the given id
belongs to.
|
void |
completeCaseExecution(String caseExecutionId)
Completes the case execution identified by the given id.
|
void |
completeCaseExecution(String caseExecutionId,
Map<String,Object> variables)
Completes the case execution identified by the given id.
|
CaseExecutionQuery |
createCaseExecutionQuery()
Creates a new
CaseExecutionQuery instance,
that can be used to query the executions and case instances. |
CaseInstance |
createCaseInstanceById(String caseDefinitionId)
Creates a new
CaseInstance in the exactly specified version identify by the provided
process definition id. |
CaseInstance |
createCaseInstanceById(String caseDefinitionId,
Map<String,Object> variables)
Creates a new
CaseInstance in the exactly specified version identify by the provided
process definition id. |
CaseInstance |
createCaseInstanceById(String caseDefinitionId,
String businessKey)
Creates a new
CaseInstance in the exactly specified version identify by the provided
process definition id. |
CaseInstance |
createCaseInstanceById(String caseDefinitionId,
String businessKey,
Map<String,Object> variables)
Creates a new
CaseInstance in the exactly specified version identify by the provided
process definition id. |
CaseInstance |
createCaseInstanceByKey(String caseDefinitionKey)
Creates a new
CaseInstance of the latest version of the case definition
with the given key. |
CaseInstance |
createCaseInstanceByKey(String caseDefinitionKey,
Map<String,Object> variables)
Creates a new
CaseInstance of the latest version of the case definition
with the given key. |
CaseInstance |
createCaseInstanceByKey(String caseDefinitionKey,
String businessKey)
Creates a new
CaseInstance of the latest version of the case definition
with the given key. |
CaseInstance |
createCaseInstanceByKey(String caseDefinitionKey,
String businessKey,
Map<String,Object> variables)
Creates a new
CaseInstance of the latest version of the case definition
with the given key. |
CaseInstanceQuery |
createCaseInstanceQuery()
Creates a new
CaseInstanceQuery instance, that can be used
to query case instances. |
void |
disableCaseExecution(String caseExecutionId)
Disables the case execution identified by the given id.
|
void |
disableCaseExecution(String caseExecutionId,
Map<String,Object> variables)
Disables the case execution identified by the given id.
|
protected Object |
getCaseExecutionVariable(String caseExecutionId,
String variableName,
boolean isLocal) |
protected org.camunda.bpm.engine.variable.VariableMap |
getCaseExecutionVariables(String caseExecutionId,
Collection<String> variableNames,
boolean isLocal,
boolean deserializeValues) |
protected <T extends org.camunda.bpm.engine.variable.value.TypedValue> |
getCaseExecutionVariableTyped(String caseExecutionId,
String variableName,
boolean isLocal,
boolean deserializeValue) |
Object |
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).
|
Object |
getVariableLocal(String caseExecutionId,
String variableName)
The variable value for an case execution.
|
<T extends org.camunda.bpm.engine.variable.value.TypedValue> |
getVariableLocalTyped(String caseExecutionId,
String variableName)
The variable value for an case execution.
|
<T extends org.camunda.bpm.engine.variable.value.TypedValue> |
getVariableLocalTyped(String caseExecutionId,
String variableName,
boolean deserializeValue)
The variable value for an case execution.
|
org.camunda.bpm.engine.variable.VariableMap |
getVariables(String caseExecutionId)
All variables visible from the given execution scope (including parent scopes).
|
org.camunda.bpm.engine.variable.VariableMap |
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).
|
org.camunda.bpm.engine.variable.VariableMap |
getVariablesLocal(String caseExecutionId)
All variable values that are defined in the case execution scope, without
taking outer scopes into account.
|
org.camunda.bpm.engine.variable.VariableMap |
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.
|
org.camunda.bpm.engine.variable.VariableMap |
getVariablesLocalTyped(String caseExecutionId)
All variable values that are defined in the case execution scope, without
taking outer scopes into account.
|
org.camunda.bpm.engine.variable.VariableMap |
getVariablesLocalTyped(String caseExecutionId,
boolean deserializeValues)
All variable values that are defined in the case execution scope, without
taking outer scopes into account.
|
org.camunda.bpm.engine.variable.VariableMap |
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.
|
org.camunda.bpm.engine.variable.VariableMap |
getVariablesTyped(String caseExecutionId)
All variables visible from the given execution scope (including parent scopes).
|
org.camunda.bpm.engine.variable.VariableMap |
getVariablesTyped(String caseExecutionId,
boolean deserializeValues)
All variables visible from the given execution scope (including parent scopes).
|
org.camunda.bpm.engine.variable.VariableMap |
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 org.camunda.bpm.engine.variable.value.TypedValue> |
getVariableTyped(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 org.camunda.bpm.engine.variable.value.TypedValue> |
getVariableTyped(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).
|
void |
manuallyStartCaseExecution(String caseExecutionId)
Starts the case execution identified by the given id manually.
|
void |
manuallyStartCaseExecution(String caseExecutionId,
Map<String,Object> variables)
Starts the case execution identified by the given id manually.
|
void |
reenableCaseExecution(String caseExecutionId)
Re-enables the case execution identified by the given id.
|
void |
reenableCaseExecution(String caseExecutionId,
Map<String,Object> variables)
Re-enables the case execution identified by the given id.
|
void |
removeVariable(String caseExecutionId,
String variableName)
Pass a name of a variable to be removed from a case execution.
|
void |
removeVariableLocal(String caseExecutionId,
String variableName)
Pass a variable name of a local variable to be removed from a case execution
(not considering parent scopes).
|
void |
removeVariables(String caseExecutionId,
Collection<String> variableNames)
Pass a collection of names identifying variables to be removed from a
case execution.
|
void |
removeVariablesLocal(String caseExecutionId,
Collection<String> variableNames)
Pass a collection of names identifying local variables to be removed from a
case execution (not considering parent scopes).
|
void |
setVariable(String caseExecutionId,
String variableName,
Object value)
Pass a variable to the case execution.
|
void |
setVariableLocal(String caseExecutionId,
String variableName,
Object value)
Pass a local variable to the case execution (not considering parent scopes).
|
void |
setVariables(String caseExecutionId,
Map<String,Object> variables)
Pass a map of variables to the case execution.
|
void |
setVariablesLocal(String caseExecutionId,
Map<String,Object> variables)
Pass a map of variables to the case execution (not considering parent scopes).
|
CaseInstanceBuilder |
withCaseDefinition(String caseDefinitionId)
Define a
CaseInstance using a fluent builder. |
CaseInstanceBuilder |
withCaseDefinitionByKey(String caseDefinitionKey)
Define a
CaseInstance using a fluent builder. |
CaseExecutionCommandBuilder |
withCaseExecution(String caseExecutionId)
Define a command to be executed for a
CaseExecution using a fluent builder. |
getCommandExecutor, setCommandExecutor
public CaseInstanceBuilder withCaseDefinitionByKey(String caseDefinitionKey)
CaseService
Define a CaseInstance
using a fluent builder.
Starts a new case instance with the latest version of the corresponding case definition.
withCaseDefinitionByKey
in interface CaseService
caseDefinitionKey
- the key of a case definition to create a new case instance of, cannot be nullfluent builder
for defining a new case instancepublic CaseInstanceBuilder withCaseDefinition(String caseDefinitionId)
CaseService
Define a CaseInstance
using a fluent builder.
Starts a new case instance with the case definition version corresponding to the given id.
withCaseDefinition
in interface CaseService
caseDefinitionId
- the id of a case definition to create a new case instance, cannot be nullfluent builder
for defining a new case instancepublic CaseInstanceQuery createCaseInstanceQuery()
CaseService
Creates a new CaseInstanceQuery
instance, that can be used
to query case instances.
createCaseInstanceQuery
in interface CaseService
public CaseExecutionQuery createCaseExecutionQuery()
CaseService
Creates a new CaseExecutionQuery
instance,
that can be used to query the executions and case instances.
createCaseExecutionQuery
in interface CaseService
public CaseExecutionCommandBuilder withCaseExecution(String caseExecutionId)
CaseService
Define a command to be executed for a CaseExecution
using a fluent builder.
withCaseExecution
in interface CaseService
caseExecutionId
- the id of a case execution to define a command for itfluent builder
for defining a command
for a case executionpublic org.camunda.bpm.engine.variable.VariableMap getVariables(String caseExecutionId)
CaseService
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 CaseService.getVariables(String, Collection)
for better performance.
getVariables
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nullpublic org.camunda.bpm.engine.variable.VariableMap getVariablesTyped(String caseExecutionId)
CaseService
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 CaseService.getVariables(String, Collection)
for better performance.
getVariablesTyped
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nullpublic org.camunda.bpm.engine.variable.VariableMap getVariablesTyped(String caseExecutionId, boolean deserializeValues)
CaseService
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 CaseService.getVariables(String, Collection)
for better performance.
getVariablesTyped
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nulldeserializeValues
- if false, the process engine will not attempt to deserialize SerializableValues
.public org.camunda.bpm.engine.variable.VariableMap getVariablesLocal(String caseExecutionId)
CaseService
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 CaseService.getVariablesLocal(String, Collection)
for better performance.
getVariablesLocal
in interface CaseService
caseExecutionId
- the id of a case execution, cannot be nullpublic org.camunda.bpm.engine.variable.VariableMap getVariablesLocalTyped(String caseExecutionId)
CaseService
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 CaseService.getVariablesLocal(String, Collection)
for better performance.
getVariablesLocalTyped
in interface CaseService
caseExecutionId
- the id of a case execution, cannot be nullpublic org.camunda.bpm.engine.variable.VariableMap getVariablesLocalTyped(String caseExecutionId, boolean deserializeValues)
CaseService
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 CaseService.getVariablesLocal(String, Collection)
for better performance.
getVariablesLocalTyped
in interface CaseService
caseExecutionId
- the id of a case execution, cannot be nulldeserializeValues
- if false, the process engine will not attempt to deserialize SerializableValues
.public org.camunda.bpm.engine.variable.VariableMap getVariables(String caseExecutionId, Collection<String> variableNames)
CaseService
The variable values for all given variableNames, takes all variables into account which are visible from the given case execution scope (including parent scopes).
getVariables
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nullvariableNames
- the collection of variable names that should be retrievedpublic org.camunda.bpm.engine.variable.VariableMap getVariablesTyped(String caseExecutionId, Collection<String> variableNames, boolean deserializeValues)
CaseService
The variable values for all given variableNames, takes all variables into account which are visible from the given case execution scope (including parent scopes).
getVariablesTyped
in interface CaseService
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 deserializedpublic org.camunda.bpm.engine.variable.VariableMap getVariablesLocal(String caseExecutionId, Collection<String> variableNames)
CaseService
The variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.
getVariablesLocal
in interface CaseService
caseExecutionId
- the id of a case execution, cannot be nullvariableNames
- the collection of variable names that should be retrievedpublic org.camunda.bpm.engine.variable.VariableMap getVariablesLocalTyped(String caseExecutionId, Collection<String> variableNames, boolean deserializeValues)
CaseService
The variable values for the given variableNames only taking the given case execution scope into account, not looking in outer scopes.
getVariablesLocalTyped
in interface CaseService
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 deserialize SerializableValues
.protected org.camunda.bpm.engine.variable.VariableMap getCaseExecutionVariables(String caseExecutionId, Collection<String> variableNames, boolean isLocal, boolean deserializeValues)
public Object getVariable(String caseExecutionId, String variableName)
CaseService
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.
getVariable
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nullvariableName
- the name of a variable, cannot be nullpublic Object getVariableLocal(String caseExecutionId, String variableName)
CaseService
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.
getVariableLocal
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nullvariableName
- the name of a variable, cannot be nullprotected Object getCaseExecutionVariable(String caseExecutionId, String variableName, boolean isLocal)
public <T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableTyped(String caseExecutionId, String variableName)
CaseService
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.
getVariableTyped
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nullvariableName
- the name of a variable, cannot be nullpublic <T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableTyped(String caseExecutionId, String variableName, boolean deserializeValue)
CaseService
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.
getVariableTyped
in interface CaseService
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 deserializedpublic <T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableLocalTyped(String caseExecutionId, String variableName)
CaseService
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.
getVariableLocalTyped
in interface CaseService
caseExecutionId
- the id of a case instance or case execution, cannot be nullvariableName
- the name of a variable, cannot be nullpublic <T extends org.camunda.bpm.engine.variable.value.TypedValue> T getVariableLocalTyped(String caseExecutionId, String variableName, boolean deserializeValue)
CaseService
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.
getVariableLocalTyped
in interface CaseService
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 deserializedprotected <T extends org.camunda.bpm.engine.variable.value.TypedValue> T getCaseExecutionVariableTyped(String caseExecutionId, String variableName, boolean isLocal, boolean deserializeValue)
public void setVariables(String caseExecutionId, Map<String,Object> variables)
CaseService
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.
setVariables
in interface CaseService
caseExecutionId
- the case execution to set the variables forvariables
- the map of variablespublic void setVariablesLocal(String caseExecutionId, Map<String,Object> variables)
CaseService
Pass a map of variables to the case execution (not considering parent scopes).
setVariablesLocal
in interface CaseService
caseExecutionId
- the case execution to set the variables forvariables
- the map of variablespublic void setVariable(String caseExecutionId, String variableName, Object value)
CaseService
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.
setVariable
in interface CaseService
caseExecutionId
- the case execution to set the variable forvariableName
- the name of the variable to setvalue
- the value of the variable to setpublic void setVariableLocal(String caseExecutionId, String variableName, Object value)
CaseService
Pass a local variable to the case execution (not considering parent scopes).
setVariableLocal
in interface CaseService
caseExecutionId
- the case execution to set the variable forvariableName
- the name of the variable to setvalue
- the value of the variable to setpublic void removeVariables(String caseExecutionId, Collection<String> variableNames)
CaseService
Pass a collection of names identifying variables to be removed from a case execution.
removeVariables
in interface CaseService
caseExecutionId
- the case execution to remove the variables fromvariableNames
- a collection of names of variables to removepublic void removeVariablesLocal(String caseExecutionId, Collection<String> variableNames)
CaseService
Pass a collection of names identifying local variables to be removed from a case execution (not considering parent scopes).
removeVariablesLocal
in interface CaseService
caseExecutionId
- the case execution to remove the variables fromvariableNames
- a collection of names of variables to removepublic void removeVariable(String caseExecutionId, String variableName)
CaseService
Pass a name of a variable to be removed from a case execution.
removeVariable
in interface CaseService
caseExecutionId
- the case execution to remove the variable fromvariableName
- the name of the variable to removepublic void removeVariableLocal(String caseExecutionId, String variableName)
CaseService
Pass a variable name of a local variable to be removed from a case execution (not considering parent scopes).
removeVariableLocal
in interface CaseService
caseExecutionId
- the case execution to remove the variable fromvariableName
- the name of a variable to removepublic CaseInstance createCaseInstanceByKey(String caseDefinitionKey)
CaseService
Creates a new CaseInstance
of the latest version of the case definition
with the given key. The new case instance will be in the ACTIVE
state.
createCaseInstanceByKey
in interface CaseService
caseDefinitionKey
- the key of the case definition to instantiatepublic CaseInstance createCaseInstanceByKey(String caseDefinitionKey, String businessKey)
CaseService
Creates a new CaseInstance
of the latest version of the case definition
with the given key. The new case instance will be in the ACTIVE
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.
createCaseInstanceByKey
in interface CaseService
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.public CaseInstance createCaseInstanceByKey(String caseDefinitionKey, Map<String,Object> variables)
CaseService
Creates a new CaseInstance
of the latest version of the case definition
with the given key. The new case instance will be in the ACTIVE
state.
createCaseInstanceByKey
in interface CaseService
caseDefinitionKey
- the key of the case definition to instantiatevariables
- variables to be set on the new case instancepublic CaseInstance createCaseInstanceByKey(String caseDefinitionKey, String businessKey, Map<String,Object> variables)
CaseService
Creates a new CaseInstance
of the latest version of the case definition
with the given key. The new case instance will be in the ACTIVE
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.
createCaseInstanceByKey
in interface CaseService
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.public CaseInstance createCaseInstanceById(String caseDefinitionId)
CaseService
Creates a new CaseInstance
in the exactly specified version identify by the provided
process definition id. The new case instance will be in the ACTIVE
state.
createCaseInstanceById
in interface CaseService
caseDefinitionId
- the id of the case definition to instantiatepublic CaseInstance createCaseInstanceById(String caseDefinitionId, String businessKey)
CaseService
Creates a new CaseInstance
in the exactly specified version identify by the provided
process definition id. The new case instance will be in the ACTIVE
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.
createCaseInstanceById
in interface CaseService
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.public CaseInstance createCaseInstanceById(String caseDefinitionId, Map<String,Object> variables)
CaseService
Creates a new CaseInstance
in the exactly specified version identify by the provided
process definition id. The new case instance will be in the ACTIVE
state.
createCaseInstanceById
in interface CaseService
caseDefinitionId
- the id of the case definition to instantiatevariables
- variables to be set on the new case instance.public CaseInstance createCaseInstanceById(String caseDefinitionId, String businessKey, Map<String,Object> variables)
CaseService
Creates a new CaseInstance
in the exactly specified version identify by the provided
process definition id. The new case instance will be in the ACTIVE
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.
createCaseInstanceById
in interface CaseService
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.public void manuallyStartCaseExecution(String caseExecutionId)
CaseService
Starts the case execution identified by the given id manually.
Performs the transition from state
ENABLED
to state ACTIVE
.
According to CMMN 1.0 specification, the state ACTIVE
means that the
Stage
or Task
related to the case execution does the following:
Task
: the task
is completed immediatelyHumanTask
: a new user task
is instantiatedProcessTask
: a new process instance
is instantiatedCaseTask
: a new case instance
is instantiatedmanuallyStartCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to manually startpublic void manuallyStartCaseExecution(String caseExecutionId, Map<String,Object> variables)
CaseService
Starts the case execution identified by the given id manually.
Performs a transition from state
ENABLED
to state ACTIVE
.
According to CMMN 1.0 specification, the state ACTIVE
means that the
Stage
or Task
related to the case execution does the following:
Task
: the task
is completed immediatelyHumanTask
: a new user task
is instantiatedProcessTask
: a new process instance
is instantiatedCaseTask
: a new case instance
is instantiatedmanuallyStartCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to manually startvariables
- variables to be set on the case executionpublic void disableCaseExecution(String caseExecutionId)
CaseService
Disables the case execution identified by the given id.
Performs a transition from state ENABLED
to state DISABLED
.
According to CMMN 1.0 specification, the state DISABLED
means that the
Stage
or Task
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.
disableCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to disablepublic void disableCaseExecution(String caseExecutionId, Map<String,Object> variables)
CaseService
Disables the case execution identified by the given id.
Performs a transition from state ENABLED
to state DISABLED
.
According to CMMN 1.0 specification, the state DISABLED
means that the
Stage
or Task
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.
disableCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to disablevariables
- variables to be set on the case executionpublic void reenableCaseExecution(String caseExecutionId)
CaseService
Re-enables the case execution identified by the given id.
Performs a transition from state DISABLED
to state ENABLED
.
According to CMMN 1.0 specification, the state DISABLED
means that the
Stage
or Task
related to the case execution pends for a decision
to become ACTIVE
or DISABLED
.
reenableCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to re-enablepublic void reenableCaseExecution(String caseExecutionId, Map<String,Object> variables)
CaseService
Re-enables the case execution identified by the given id.
Performs a transition from state DISABLED
to state ENABLED
.
According to CMMN 1.0 specification, the state DISABLED
means that the
Stage
or Task
related to the case execution pends for a decision
to become ACTIVE
or DISABLED
.
reenableCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to re-enablevariables
- variables to be set on the case executionpublic void completeCaseExecution(String caseExecutionId)
CaseService
Completes the case execution identified by the given id.
Performs a transition from state ACTIVE
to state COMPLETED
.
It is only possible to complete a case execution which is associated with a
Stage
or Task
.
In case of a Stage
, the completion can only be performed when the following
criteria are fulfilled:
ACTIVE
For a Task
instance, this means its purpose has been accomplished:
HumanTask
has been completed by human.If the given case execution has a parent case execution, that parent case execution will be notified that the given case execution has been completed. This can lead to a completion of the parent case execution if the completion criteria are fulfilled.
completeCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to completepublic void completeCaseExecution(String caseExecutionId, Map<String,Object> variables)
CaseService
Completes the case execution identified by the given id.
Performs a transition from state ACTIVE
to state COMPLETED
.
It is only possible to complete a case execution which is associated with a
Stage
or Task
.
In case of a Stage
, the completion can only be performed when the following
criteria are fulfilled:
ACTIVE
For a Task
instance, this means its purpose has been accomplished:
HumanTask
has been completed by human.If the given case execution has a parent case execution, that parent case execution will be notified that the given case execution has been completed. This can lead to a completion of the parent case execution if the completion criteria are fulfilled.
completeCaseExecution
in interface CaseService
caseExecutionId
- the id of the case execution to completevariables
- variables to be set on the case executionpublic void closeCaseInstance(String caseInstanceId)
CaseService
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 state CLOSED
.
closeCaseInstance
in interface CaseService
caseInstanceId
- the id of the case execution to close
the case instance forCopyright © 2018. All rights reserved.