Class CaseExecutionEntity
- All Implemented Interfaces:
Serializable
,BaseDelegateExecution
,CmmnModelExecutionContext
,DelegateCaseExecution
,ProcessEngineServicesAware
,VariableScope
,CmmnActivityExecution
,CmmnCaseInstance
,VariableEventDispatcher
,VariableStore.VariablesProvider<VariableInstanceEntity>
,DbEntity
,HasDbReferences
,HasDbRevision
,CaseExecution
,CaseInstance
- Author:
- Roman Smirnov
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
protected List<CaseExecutionEntity>
nested executionsprotected CaseExecutionEntity
the case instance.protected String
protected List<CaseSentryPartEntity>
nested case sentry partsprotected CaseExecutionEntity
the parent executionprotected String
protected int
protected Map<String,
List<CmmnSentryPart>> protected CaseExecutionEntity
protected ExecutionEntity
reference to a sub process instance, not-null if currently subprocess is started from this executionprotected CaseExecutionEntity
protected String
protected ExecutionEntity
protected String
protected VariableStore<VariableInstanceEntity>
Fields inherited from class org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution
activity, caseDefinition, currentState, entryCriterionSatisfied, LOG, previousState, required, task, variableEventsQueue
Fields inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
businessKey, businessKeyWithoutCascade, eventName, eventSource, id, listenerIndex, skipCustomListeners, skipIoMapping, skipSubprocesses, tenantId
Fields inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
cachedElContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addSentryPart
(CmmnSentryPart sentryPart) void
This
case instance transitions toACTIVE
state.protected CaseExecutionEntity
createCaseExecution
(CmmnActivity activity) createSubCaseInstance
(CmmnCaseDefinition caseDefinition) Creates a new sub case instance.createSubCaseInstance
(CmmnCaseDefinition caseDefinition, String businessKey) Creates a new sub case instance.createSubProcessInstance
(PvmProcessDefinition processDefinition) Creates a new sub process instance.createSubProcessInstance
(PvmProcessDefinition processDefinition, String businessKey) Creates a new sub process instance.createSubProcessInstance
(PvmProcessDefinition processDefinition, String businessKey, String caseInstanceId) Creates a new sub process instance.createTask
(TaskDecorator taskDecorator) Creates a new task.protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected List<CmmnSentryPart>
findSentry
(String sentryId) void
void
ensures initialization and returns the activityThe description of the activity associated withthis
case execution.The id of the activity associated withthis
case execution.The name of the activity associated withthis
case execution.protected String
getActivityProperty
(CmmnActivity activity, String property) The type of the activity associated withthis
case execution.ensures initialization and returns the case definition.The id of the case definition of the case execution.Returns aList
of child case executions.protected List<CaseExecutionEntity>
ensures initialization and returns the process instance.ensures initialization and returns the process instance.Returns the currently executed Element in the Cmmn Model.Returns theCmmnModelInstance
for the currently executed Cmmn Modelensures initialization and returns the parentThe id of the parent ofthis
case execution.Returns a representation of the object, as would be stored in the database.Returns theProcessEngine
providing access to the public API of the process engine.Returns theProcessEngineServices
providing access to the public API of the process engine.Scope: IN-MEMORY referencesScope: IN-MEMORY referencesint
int
protected Map<String,
List<CmmnSentryPart>> getTask()
protected String
protected VariableInstanceFactory<CoreVariableInstance>
protected VariableStore<CoreVariableInstance>
boolean
Returnstrue
ifthis
case execution is a case instance.protected boolean
protected CaseExecutionEntity
protected CaseSentryPartEntity
<T extends CoreExecution>
voidperformOperation
(CoreAtomicOperation<T> operation) <T extends CoreExecution>
voidperformOperationSync
(CoreAtomicOperation<T> operation) protected void
provideTenantId
(Map<String, Object> variables) provideVariables
(Collection<String> variableNames) void
remove()
Removesthis
case execution from the parent case execution.void
setActivity
(CmmnActivity activity) void
setCaseDefinition
(CmmnCaseDefinition caseDefinition) void
setCaseInstance
(CmmnExecution caseInstance) void
setParent
(CmmnExecution parent) void
setRevision
(int revision) void
setSubCaseInstance
(CmmnExecution subCaseInstance) void
setSubProcessInstance
(PvmExecutionImpl subProcessInstance) void
setSuperCaseExecution
(CmmnExecution superCaseExecution) void
setSuperCaseExecutionId
(String superCaseExecutionId) void
setSuperExecution
(PvmExecutionImpl superExecution) void
setSuperExecutionId
(String superProcessExecutionId) toString()
Methods inherited from class org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution
addIdIfNotSatisfied, checkAndFireEntryCriteria, checkAndFireExitCriteria, close, collectAffectedSentries, collectAffectedSentriesWithVariableOnParts, collectAllSentries, collectCaseExecutionsInExecutionTree, collectSentryParts, complete, containsIfPartAndExecutionActive, create, createChildExecutions, createIfPart, createOnPart, createSentryPart, createSentryParts, createVariableOnPart, deleteCascade, disable, dispatchEvent, enable, exit, findCaseExecution, fireEntryCriteria, fireExitCriteria, fireIfOnlySentryParts, fireSentries, forceUpdateOnCaseSentryParts, forceUpdateOnSentries, getAffectedSentryParts, getBusinessKey, getCaseBusinessKey, getCurrentState, getParentVariableScope, getPrevious, getPreviousState, getSatisfiedSentries, getSatisfiedSentriesInExecutionTree, getState, getVariableEventQueue, getVariableScopeKey, handleChildTransition, handleVariableTransition, hasVariableWithSameNameInParent, invokeVariableListeners, isActive, isAvailable, isClosed, isCompleted, isDisabled, isEnabled, isEntryCriterionSatisfied, isFailed, isNew, isNotSatisfiedIfPartOnly, isRequired, isSentryPartsSatisfied, isSentrySatisfied, isSuspended, isSuspending, isTerminated, isTerminating, manualComplete, manualStart, occur, parentComplete, parentResume, parentSuspend, parentTerminate, performExit, performParentSuspension, performParentTerminate, performSuspension, performTerminate, queueVariableEvent, reactivate, reenable, resetSentries, resetSentryParts, resume, setCurrentState, setPrevious, setRequired, setState, setTask, start, suspend, terminate, triggerChildExecutionsLifecycle
Methods inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
getBusinessKeyWithoutCascade, getEventName, getEventSource, getId, getListenerIndex, getTenantId, hasFailedOnEndListeners, invokeListener, isSkipCustomListeners, isSkipIoMappings, isSkipSubprocesses, setBusinessKey, setEventName, setEventSource, setId, setListenerIndex, setSkipCustomListeners, setSkipIoMappings, setSkipSubprocesseses, setTenantId
Methods inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
collectVariableNames, collectVariables, getCachedElContext, getSourceActivityVariableScope, getValueFromVariableInstance, getVariable, getVariable, getVariableInstance, getVariableInstanceLocal, getVariableInstancesLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, initializeVariableStore, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersUpdate, invokeVariableLifecycleListenersUpdate, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariableLocal, setVariables, setVariables, setVariablesLocal, setVariablesLocal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.camunda.bpm.engine.runtime.CaseExecution
getId, getTenantId, isActive, isAvailable, isDisabled, isEnabled, isRequired, isTerminated
Methods inherited from interface org.camunda.bpm.engine.runtime.CaseInstance
getBusinessKey, isCompleted
Methods inherited from interface org.camunda.bpm.engine.delegate.DelegateCaseExecution
getEventName, getId, getTenantId
Methods inherited from interface org.camunda.bpm.engine.impl.db.HasDbReferences
getDependentEntities
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
getVariable, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
-
Field Details
-
caseInstance
the case instance. this is the root of the execution tree. the caseInstance of a case instance is a self reference. -
parent
the parent execution -
caseExecutions
nested executions -
caseSentryParts
nested case sentry parts -
sentries
-
subProcessInstance
reference to a sub process instance, not-null if currently subprocess is started from this execution -
superExecution
-
subCaseInstance
-
superCaseExecution
-
variableStore
-
revision
protected int revision -
caseDefinitionId
-
activityId
-
caseInstanceId
-
parentId
-
superCaseExecutionId
-
superExecutionId
-
activityName
-
activityType
-
activityDescription
-
-
Constructor Details
-
CaseExecutionEntity
public CaseExecutionEntity()
-
-
Method Details
-
getCaseDefinitionId
Description copied from interface:CaseExecution
The id of the case definition of the case execution.
- Specified by:
getCaseDefinitionId
in interfaceCaseExecution
- Specified by:
getCaseDefinitionId
in interfaceDelegateCaseExecution
-
getCaseDefinition
ensures initialization and returns the case definition.- Overrides:
getCaseDefinition
in classCmmnExecution
-
setCaseDefinition
- Overrides:
setCaseDefinition
in classCmmnExecution
-
ensureCaseDefinitionInitialized
protected void ensureCaseDefinitionInitialized() -
getParent
Description copied from class:CmmnExecution
ensures initialization and returns the parent- Specified by:
getParent
in interfaceCmmnActivityExecution
- Specified by:
getParent
in classCmmnExecution
- Returns:
- a
parent
or null.
-
setParent
- Specified by:
setParent
in classCmmnExecution
-
ensureParentInitialized
protected void ensureParentInitialized() -
ensureCaseExecutionTreeInitialized
protected void ensureCaseExecutionTreeInitialized() -
isExecutionTreePrefetchEnabled
protected boolean isExecutionTreePrefetchEnabled()- Returns:
- true if execution tree prefetching is enabled
-
getParentId
Description copied from interface:CaseExecution
The id of the parent of
this
case execution.- Specified by:
getParentId
in interfaceCaseExecution
- Specified by:
getParentId
in interfaceDelegateCaseExecution
-
getActivity
Description copied from class:CmmnExecution
ensures initialization and returns the activity- Specified by:
getActivity
in interfaceCmmnActivityExecution
- Overrides:
getActivity
in classCmmnExecution
- Returns:
- the associated
activity
-
setActivity
- Overrides:
setActivity
in classCmmnExecution
-
ensureActivityInitialized
protected void ensureActivityInitialized() -
getActivityProperty
-
getActivityId
Description copied from interface:CaseExecution
The id of the activity associated with
this
case execution.- Specified by:
getActivityId
in interfaceCaseExecution
- Specified by:
getActivityId
in interfaceDelegateCaseExecution
-
getActivityName
Description copied from interface:CaseExecution
The name of the activity associated with
this
case execution.- Specified by:
getActivityName
in interfaceCaseExecution
- Specified by:
getActivityName
in interfaceDelegateCaseExecution
-
getActivityType
Description copied from interface:CaseExecution
The type of the activity associated with
this
case execution.- Specified by:
getActivityType
in interfaceCaseExecution
-
getActivityDescription
Description copied from interface:CaseExecution
The description of the activity associated with
this
case execution.- Specified by:
getActivityDescription
in interfaceCaseExecution
-
getCaseExecutions
Description copied from interface:CmmnActivityExecution
Returns a
List
of child case executions. Ifthis
case execution has no child case executions an emptyList
will be returned.- Specified by:
getCaseExecutions
in interfaceCmmnActivityExecution
- Specified by:
getCaseExecutions
in classCmmnExecution
- Returns:
- a
List
of child case executions.
-
getCaseExecutionsInternal
- Specified by:
getCaseExecutionsInternal
in classCmmnExecution
-
ensureCaseExecutionsInitialized
protected void ensureCaseExecutionsInitialized() -
getTask
- Overrides:
getTask
in classCmmnExecution
-
ensureTaskInitialized
protected void ensureTaskInitialized() -
createTask
Description copied from interface:CmmnActivityExecution
Creates a new task.
case execution will be the case execution of the created task.This
- Specified by:
createTask
in interfaceCmmnActivityExecution
- Overrides:
createTask
in classCmmnExecution
- Parameters:
taskDecorator
- the task decorator used to create task
-
getCaseInstanceId
Description copied from class:CmmnExecution
ensures initialization and returns the process instance.- Specified by:
getCaseInstanceId
in interfaceCaseExecution
- Specified by:
getCaseInstanceId
in interfaceDelegateCaseExecution
- Overrides:
getCaseInstanceId
in classCmmnExecution
-
getCaseInstance
Description copied from class:CmmnExecution
ensures initialization and returns the process instance.- Specified by:
getCaseInstance
in classCmmnExecution
-
setCaseInstance
- Specified by:
setCaseInstance
in classCmmnExecution
-
ensureCaseInstanceInitialized
protected void ensureCaseInstanceInitialized() -
isCaseInstanceExecution
public boolean isCaseInstanceExecution()Description copied from interface:CmmnActivityExecution
Returns
true
ifthis
case execution is a case instance. Ifthis
case execution is not a case instance thenfalse
will be returned.- Specified by:
isCaseInstanceExecution
in interfaceCmmnActivityExecution
- Overrides:
isCaseInstanceExecution
in classCmmnExecution
- Returns:
- whether
this
case execution is a case instance or not.
-
create
Description copied from interface:CmmnCaseInstance
This
case instance transitions toACTIVE
state.The given
variables
will be set a case instance variables.- Specified by:
create
in interfaceCmmnCaseInstance
- Overrides:
create
in classCmmnExecution
-
provideTenantId
-
createCaseExecution
- Specified by:
createCaseExecution
in classCmmnExecution
-
newCaseExecution
- Specified by:
newCaseExecution
in classCmmnExecution
-
getSuperExecutionId
-
setSuperExecutionId
-
getSuperExecution
- Specified by:
getSuperExecution
in classCmmnExecution
-
setSuperExecution
- Specified by:
setSuperExecution
in classCmmnExecution
-
ensureSuperExecutionInstanceInitialized
protected void ensureSuperExecutionInstanceInitialized() -
getSubProcessInstance
- Specified by:
getSubProcessInstance
in classCmmnExecution
-
setSubProcessInstance
- Specified by:
setSubProcessInstance
in classCmmnExecution
-
createSubProcessInstance
Description copied from interface:CmmnActivityExecution
Creates a new sub process instance.
This
case execution will be the super case execution of the created sub process instance.- Specified by:
createSubProcessInstance
in interfaceCmmnActivityExecution
- Specified by:
createSubProcessInstance
in classCmmnExecution
- Parameters:
processDefinition
- ThePvmProcessDefinition
of the subprocess.
-
createSubProcessInstance
public ExecutionEntity createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey) Description copied from interface:CmmnActivityExecution
Creates a new sub process instance.
This
case execution will be the super case execution of the created sub process instance.- Specified by:
createSubProcessInstance
in interfaceCmmnActivityExecution
- Specified by:
createSubProcessInstance
in classCmmnExecution
- Parameters:
processDefinition
- ThePvmProcessDefinition
of the subprocess.businessKey
- The businessKey to be set on sub process instance.
-
createSubProcessInstance
public ExecutionEntity createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey, String caseInstanceId) Description copied from interface:CmmnActivityExecution
Creates a new sub process instance.
This
case execution will be the super case execution of the created sub process instance.- Specified by:
createSubProcessInstance
in interfaceCmmnActivityExecution
- Specified by:
createSubProcessInstance
in classCmmnExecution
- Parameters:
processDefinition
- ThePvmProcessDefinition
of the subprocess.businessKey
- The businessKey to be set on sub process instance.caseInstanceId
- The caseInstanceId to be set on sub process instance.
-
ensureSubProcessInstanceInitialized
protected void ensureSubProcessInstanceInitialized() -
getSubCaseInstance
- Specified by:
getSubCaseInstance
in classCmmnExecution
-
setSubCaseInstance
- Specified by:
setSubCaseInstance
in classCmmnExecution
-
createSubCaseInstance
Description copied from interface:CmmnActivityExecution
Creates a new sub case instance.
This
case execution will be the super case execution of the created sub case instance.- Specified by:
createSubCaseInstance
in interfaceCmmnActivityExecution
- Specified by:
createSubCaseInstance
in classCmmnExecution
- Parameters:
caseDefinition
- TheCmmnCaseDefinition
of the sub case instance.
-
createSubCaseInstance
public CaseExecutionEntity createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey) Description copied from interface:CmmnActivityExecution
Creates a new sub case instance.
This
case execution will be the super case execution of the created sub case instance.- Specified by:
createSubCaseInstance
in interfaceCmmnActivityExecution
- Specified by:
createSubCaseInstance
in classCmmnExecution
- Parameters:
caseDefinition
- TheCmmnCaseDefinition
of the sub case instance.businessKey
- The businessKey to be set on sub case instance.
-
fireHistoricCaseActivityInstanceUpdate
public void fireHistoricCaseActivityInstanceUpdate() -
ensureSubCaseInstanceInitialized
protected void ensureSubCaseInstanceInitialized() -
getSuperCaseExecutionId
-
setSuperCaseExecutionId
-
getSuperCaseExecution
- Specified by:
getSuperCaseExecution
in classCmmnExecution
-
setSuperCaseExecution
- Specified by:
setSuperCaseExecution
in classCmmnExecution
-
ensureSuperCaseExecutionInitialized
protected void ensureSuperCaseExecutionInitialized() -
getCaseSentryParts
- Specified by:
getCaseSentryParts
in classCmmnExecution
-
ensureCaseSentryPartsInitialized
protected void ensureCaseSentryPartsInitialized() -
addSentryPart
- Specified by:
addSentryPart
in classCmmnExecution
-
getSentries
- Specified by:
getSentries
in classCmmnExecution
-
findSentry
- Specified by:
findSentry
in classCmmnExecution
-
newSentryPart
- Specified by:
newSentryPart
in classCmmnExecution
-
getVariableStore
- Specified by:
getVariableStore
in classAbstractVariableScope
-
getVariableInstanceFactory
- Specified by:
getVariableInstanceFactory
in classAbstractVariableScope
-
getVariableInstanceLifecycleListeners
protected List<VariableInstanceLifecycleListener<CoreVariableInstance>> getVariableInstanceLifecycleListeners()- Specified by:
getVariableInstanceLifecycleListeners
in classAbstractVariableScope
-
provideVariables
- Specified by:
provideVariables
in interfaceVariableStore.VariablesProvider<VariableInstanceEntity>
-
provideVariables
- Specified by:
provideVariables
in interfaceVariableStore.VariablesProvider<VariableInstanceEntity>
-
toString
- Overrides:
toString
in classCmmnExecution
-
getToStringIdentity
- Overrides:
getToStringIdentity
in classCmmnExecution
-
remove
public void remove()Description copied from interface:CmmnActivityExecution
Removes
this
case execution from the parent case execution.- Specified by:
remove
in interfaceCmmnActivityExecution
- Overrides:
remove
in classCmmnExecution
-
getRevision
public int getRevision()- Specified by:
getRevision
in interfaceHasDbRevision
-
setRevision
public void setRevision(int revision) - Specified by:
setRevision
in interfaceHasDbRevision
-
getRevisionNext
public int getRevisionNext()- Specified by:
getRevisionNext
in interfaceHasDbRevision
-
forceUpdate
public void forceUpdate() -
getReferencedEntityIds
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntityIds
in interfaceHasDbReferences
- Returns:
- the ids of the entities that this entity references. Should only return ids for entities of the same type
-
getReferencedEntitiesIdAndClass
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntitiesIdAndClass
in interfaceHasDbReferences
- Returns:
- a map of the ids and the entities' classes that this entity references. It's used when trying to determine if there was an Optimistic Locking occurrence on an INSERT or UPDATE of an object of this type.
-
getPersistentState
Description copied from interface:DbEntity
Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.- Specified by:
getPersistentState
in interfaceDbEntity
-
getCmmnModelInstance
Description copied from interface:CmmnModelExecutionContext
Returns theCmmnModelInstance
for the currently executed Cmmn Model- Specified by:
getCmmnModelInstance
in interfaceCmmnModelExecutionContext
- Returns:
- the current
CmmnModelInstance
-
getCmmnModelElementInstance
Description copied from interface:CmmnModelExecutionContext
Returns the currently executed Element in the Cmmn Model. This method returns a
CmmnElement
which may be casted to the concrete type of the Cmmn Model Element currently executed.- Specified by:
getCmmnModelElementInstance
in interfaceCmmnModelExecutionContext
- Returns:
- the
CmmnElement
corresponding to the current Cmmn Model Element
-
getProcessEngineServices
Description copied from interface:ProcessEngineServicesAware
Returns theProcessEngineServices
providing access to the public API of the process engine.- Specified by:
getProcessEngineServices
in interfaceProcessEngineServicesAware
- Returns:
- the
ProcessEngineServices
.
-
getProcessEngine
Description copied from interface:ProcessEngineServicesAware
Returns theProcessEngine
providing access to the public API of the process engine.- Specified by:
getProcessEngine
in interfaceProcessEngineServicesAware
- Returns:
- the
ProcessEngine
.
-
getCaseDefinitionTenantId
-
performOperation
- Overrides:
performOperation
in classCoreExecution
-
performOperationSync
- Overrides:
performOperationSync
in classCoreExecution
-