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
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected List<CaseExecutionEntity>nested executionsprotected CaseExecutionEntitythe case instance.protected Stringprotected List<CaseSentryPartEntity>nested case sentry partsprotected CaseExecutionEntitythe parent executionprotected Stringprotected intprotected Map<String,List<CmmnSentryPart>> protected CaseExecutionEntityprotected ExecutionEntityreference to a sub process instance, not-null if currently subprocess is started from this executionprotected CaseExecutionEntityprotected Stringprotected ExecutionEntityprotected Stringprotected VariableStore<VariableInstanceEntity>Fields inherited from class org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution
activity, caseDefinition, currentState, entryCriterionSatisfied, LOG, previousState, required, task, variableEventsQueueFields inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
businessKey, businessKeyWithoutCascade, eventName, eventSource, id, listenerIndex, skipCustomListeners, skipIoMapping, skipSubprocesses, tenantIdFields inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
cachedElContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSentryPart(CmmnSentryPart sentryPart) voidThiscase instance transitions toACTIVEstate.protected CaseExecutionEntitycreateCaseExecution(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 voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected List<CmmnSentryPart>findSentry(String sentryId) voidvoidensures initialization and returns the activityThe description of the activity associated withthiscase execution.The id of the activity associated withthiscase execution.The name of the activity associated withthiscase execution.protected StringgetActivityProperty(CmmnActivity activity, String property) The type of the activity associated withthiscase execution.ensures initialization and returns the case definition.The id of the case definition of the case execution.Returns aListof 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 theCmmnModelInstancefor the currently executed Cmmn Modelensures initialization and returns the parentThe id of the parent ofthiscase execution.Returns a representation of the object, as would be stored in the database.Returns theProcessEngineproviding access to the public API of the process engine.Returns theProcessEngineServicesproviding access to the public API of the process engine.Scope: IN-MEMORY referencesScope: IN-MEMORY referencesintintprotected Map<String,List<CmmnSentryPart>> getTask()protected Stringprotected VariableInstanceFactory<CoreVariableInstance>protected VariableStore<CoreVariableInstance>booleanReturnstrueifthiscase execution is a case instance.protected booleanprotected CaseExecutionEntityprotected CaseSentryPartEntity<T extends CoreExecution>
voidperformOperation(CoreAtomicOperation<T> operation) <T extends CoreExecution>
voidperformOperationSync(CoreAtomicOperation<T> operation) protected voidprovideTenantId(Map<String, Object> variables) provideVariables(Collection<String> variableNames) voidremove()Removesthiscase execution from the parent case execution.voidsetActivity(CmmnActivity activity) voidsetCaseDefinition(CmmnCaseDefinition caseDefinition) voidsetCaseInstance(CmmnExecution caseInstance) voidsetParent(CmmnExecution parent) voidsetRevision(int revision) voidsetSubCaseInstance(CmmnExecution subCaseInstance) voidsetSubProcessInstance(PvmExecutionImpl subProcessInstance) voidsetSuperCaseExecution(CmmnExecution superCaseExecution) voidsetSuperCaseExecutionId(String superCaseExecutionId) voidsetSuperExecution(PvmExecutionImpl superExecution) voidsetSuperExecutionId(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, triggerChildExecutionsLifecycleMethods 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, setTenantIdMethods 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, setVariablesLocalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.runtime.CaseExecution
getId, getTenantId, isActive, isAvailable, isDisabled, isEnabled, isRequired, isTerminatedMethods inherited from interface org.camunda.bpm.engine.runtime.CaseInstance
getBusinessKey, isCompletedMethods inherited from interface org.camunda.bpm.engine.delegate.DelegateCaseExecution
getEventName, getId, getTenantIdMethods inherited from interface org.camunda.bpm.engine.impl.db.HasDbReferences
getDependentEntitiesMethods 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:CaseExecutionThe id of the case definition of the case execution.
- Specified by:
getCaseDefinitionIdin interfaceCaseExecution- Specified by:
getCaseDefinitionIdin interfaceDelegateCaseExecution
-
getCaseDefinition
ensures initialization and returns the case definition.- Overrides:
getCaseDefinitionin classCmmnExecution
-
setCaseDefinition
- Overrides:
setCaseDefinitionin classCmmnExecution
-
ensureCaseDefinitionInitialized
protected void ensureCaseDefinitionInitialized() -
getParent
Description copied from class:CmmnExecutionensures initialization and returns the parent- Specified by:
getParentin interfaceCmmnActivityExecution- Specified by:
getParentin classCmmnExecution- Returns:
- a
parentor null.
-
setParent
- Specified by:
setParentin 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:CaseExecutionThe id of the parent of
thiscase execution.- Specified by:
getParentIdin interfaceCaseExecution- Specified by:
getParentIdin interfaceDelegateCaseExecution
-
getActivity
Description copied from class:CmmnExecutionensures initialization and returns the activity- Specified by:
getActivityin interfaceCmmnActivityExecution- Overrides:
getActivityin classCmmnExecution- Returns:
- the associated
activity
-
setActivity
- Overrides:
setActivityin classCmmnExecution
-
ensureActivityInitialized
protected void ensureActivityInitialized() -
getActivityProperty
-
getActivityId
Description copied from interface:CaseExecutionThe id of the activity associated with
thiscase execution.- Specified by:
getActivityIdin interfaceCaseExecution- Specified by:
getActivityIdin interfaceDelegateCaseExecution
-
getActivityName
Description copied from interface:CaseExecutionThe name of the activity associated with
thiscase execution.- Specified by:
getActivityNamein interfaceCaseExecution- Specified by:
getActivityNamein interfaceDelegateCaseExecution
-
getActivityType
Description copied from interface:CaseExecutionThe type of the activity associated with
thiscase execution.- Specified by:
getActivityTypein interfaceCaseExecution
-
getActivityDescription
Description copied from interface:CaseExecutionThe description of the activity associated with
thiscase execution.- Specified by:
getActivityDescriptionin interfaceCaseExecution
-
getCaseExecutions
Description copied from interface:CmmnActivityExecutionReturns a
Listof child case executions. Ifthiscase execution has no child case executions an emptyListwill be returned.- Specified by:
getCaseExecutionsin interfaceCmmnActivityExecution- Specified by:
getCaseExecutionsin classCmmnExecution- Returns:
- a
Listof child case executions.
-
getCaseExecutionsInternal
- Specified by:
getCaseExecutionsInternalin classCmmnExecution
-
ensureCaseExecutionsInitialized
protected void ensureCaseExecutionsInitialized() -
getTask
- Overrides:
getTaskin classCmmnExecution
-
ensureTaskInitialized
protected void ensureTaskInitialized() -
createTask
Description copied from interface:CmmnActivityExecutionCreates a new task.
case execution will be the case execution of the created task.This- Specified by:
createTaskin interfaceCmmnActivityExecution- Overrides:
createTaskin classCmmnExecution- Parameters:
taskDecorator- the task decorator used to create task
-
getCaseInstanceId
Description copied from class:CmmnExecutionensures initialization and returns the process instance.- Specified by:
getCaseInstanceIdin interfaceCaseExecution- Specified by:
getCaseInstanceIdin interfaceDelegateCaseExecution- Overrides:
getCaseInstanceIdin classCmmnExecution
-
getCaseInstance
Description copied from class:CmmnExecutionensures initialization and returns the process instance.- Specified by:
getCaseInstancein classCmmnExecution
-
setCaseInstance
- Specified by:
setCaseInstancein classCmmnExecution
-
ensureCaseInstanceInitialized
protected void ensureCaseInstanceInitialized() -
isCaseInstanceExecution
public boolean isCaseInstanceExecution()Description copied from interface:CmmnActivityExecutionReturns
trueifthiscase execution is a case instance. Ifthiscase execution is not a case instance thenfalsewill be returned.- Specified by:
isCaseInstanceExecutionin interfaceCmmnActivityExecution- Overrides:
isCaseInstanceExecutionin classCmmnExecution- Returns:
- whether
thiscase execution is a case instance or not.
-
create
Description copied from interface:CmmnCaseInstanceThiscase instance transitions toACTIVEstate.The given
variableswill be set a case instance variables.- Specified by:
createin interfaceCmmnCaseInstance- Overrides:
createin classCmmnExecution
-
provideTenantId
-
createCaseExecution
- Specified by:
createCaseExecutionin classCmmnExecution
-
newCaseExecution
- Specified by:
newCaseExecutionin classCmmnExecution
-
getSuperExecutionId
-
setSuperExecutionId
-
getSuperExecution
- Specified by:
getSuperExecutionin classCmmnExecution
-
setSuperExecution
- Specified by:
setSuperExecutionin classCmmnExecution
-
ensureSuperExecutionInstanceInitialized
protected void ensureSuperExecutionInstanceInitialized() -
getSubProcessInstance
- Specified by:
getSubProcessInstancein classCmmnExecution
-
setSubProcessInstance
- Specified by:
setSubProcessInstancein classCmmnExecution
-
createSubProcessInstance
Description copied from interface:CmmnActivityExecutionCreates a new sub process instance.
Thiscase execution will be the super case execution of the created sub process instance.- Specified by:
createSubProcessInstancein interfaceCmmnActivityExecution- Specified by:
createSubProcessInstancein classCmmnExecution- Parameters:
processDefinition- ThePvmProcessDefinitionof the subprocess.
-
createSubProcessInstance
public ExecutionEntity createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey) Description copied from interface:CmmnActivityExecutionCreates a new sub process instance.
Thiscase execution will be the super case execution of the created sub process instance.- Specified by:
createSubProcessInstancein interfaceCmmnActivityExecution- Specified by:
createSubProcessInstancein classCmmnExecution- Parameters:
processDefinition- ThePvmProcessDefinitionof 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:CmmnActivityExecutionCreates a new sub process instance.
Thiscase execution will be the super case execution of the created sub process instance.- Specified by:
createSubProcessInstancein interfaceCmmnActivityExecution- Specified by:
createSubProcessInstancein classCmmnExecution- Parameters:
processDefinition- ThePvmProcessDefinitionof 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:
getSubCaseInstancein classCmmnExecution
-
setSubCaseInstance
- Specified by:
setSubCaseInstancein classCmmnExecution
-
createSubCaseInstance
Description copied from interface:CmmnActivityExecutionCreates a new sub case instance.
Thiscase execution will be the super case execution of the created sub case instance.- Specified by:
createSubCaseInstancein interfaceCmmnActivityExecution- Specified by:
createSubCaseInstancein classCmmnExecution- Parameters:
caseDefinition- TheCmmnCaseDefinitionof the sub case instance.
-
createSubCaseInstance
public CaseExecutionEntity createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey) Description copied from interface:CmmnActivityExecutionCreates a new sub case instance.
Thiscase execution will be the super case execution of the created sub case instance.- Specified by:
createSubCaseInstancein interfaceCmmnActivityExecution- Specified by:
createSubCaseInstancein classCmmnExecution- Parameters:
caseDefinition- TheCmmnCaseDefinitionof 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:
getSuperCaseExecutionin classCmmnExecution
-
setSuperCaseExecution
- Specified by:
setSuperCaseExecutionin classCmmnExecution
-
ensureSuperCaseExecutionInitialized
protected void ensureSuperCaseExecutionInitialized() -
getCaseSentryParts
- Specified by:
getCaseSentryPartsin classCmmnExecution
-
ensureCaseSentryPartsInitialized
protected void ensureCaseSentryPartsInitialized() -
addSentryPart
- Specified by:
addSentryPartin classCmmnExecution
-
getSentries
- Specified by:
getSentriesin classCmmnExecution
-
findSentry
- Specified by:
findSentryin classCmmnExecution
-
newSentryPart
- Specified by:
newSentryPartin classCmmnExecution
-
getVariableStore
- Specified by:
getVariableStorein classAbstractVariableScope
-
getVariableInstanceFactory
- Specified by:
getVariableInstanceFactoryin classAbstractVariableScope
-
getVariableInstanceLifecycleListeners
protected List<VariableInstanceLifecycleListener<CoreVariableInstance>> getVariableInstanceLifecycleListeners()- Specified by:
getVariableInstanceLifecycleListenersin classAbstractVariableScope
-
provideVariables
- Specified by:
provideVariablesin interfaceVariableStore.VariablesProvider<VariableInstanceEntity>
-
provideVariables
- Specified by:
provideVariablesin interfaceVariableStore.VariablesProvider<VariableInstanceEntity>
-
toString
- Overrides:
toStringin classCmmnExecution
-
getToStringIdentity
- Overrides:
getToStringIdentityin classCmmnExecution
-
remove
public void remove()Description copied from interface:CmmnActivityExecutionRemoves
thiscase execution from the parent case execution.- Specified by:
removein interfaceCmmnActivityExecution- Overrides:
removein classCmmnExecution
-
getRevision
public int getRevision()- Specified by:
getRevisionin interfaceHasDbRevision
-
setRevision
public void setRevision(int revision) - Specified by:
setRevisionin interfaceHasDbRevision
-
getRevisionNext
public int getRevisionNext()- Specified by:
getRevisionNextin interfaceHasDbRevision
-
forceUpdate
public void forceUpdate() -
getReferencedEntityIds
Description copied from interface:HasDbReferencesScope: IN-MEMORY references
- Specified by:
getReferencedEntityIdsin 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:HasDbReferencesScope: IN-MEMORY references
- Specified by:
getReferencedEntitiesIdAndClassin 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:DbEntityReturns 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:
getPersistentStatein interfaceDbEntity
-
getCmmnModelInstance
Description copied from interface:CmmnModelExecutionContextReturns theCmmnModelInstancefor the currently executed Cmmn Model- Specified by:
getCmmnModelInstancein interfaceCmmnModelExecutionContext- Returns:
- the current
CmmnModelInstance
-
getCmmnModelElementInstance
Description copied from interface:CmmnModelExecutionContextReturns the currently executed Element in the Cmmn Model. This method returns a
CmmnElementwhich may be casted to the concrete type of the Cmmn Model Element currently executed.- Specified by:
getCmmnModelElementInstancein interfaceCmmnModelExecutionContext- Returns:
- the
CmmnElementcorresponding to the current Cmmn Model Element
-
getProcessEngineServices
Description copied from interface:ProcessEngineServicesAwareReturns theProcessEngineServicesproviding access to the public API of the process engine.- Specified by:
getProcessEngineServicesin interfaceProcessEngineServicesAware- Returns:
- the
ProcessEngineServices.
-
getProcessEngine
Description copied from interface:ProcessEngineServicesAwareReturns theProcessEngineproviding access to the public API of the process engine.- Specified by:
getProcessEnginein interfaceProcessEngineServicesAware- Returns:
- the
ProcessEngine.
-
getCaseDefinitionTenantId
-
performOperation
- Overrides:
performOperationin classCoreExecution
-
performOperationSync
- Overrides:
performOperationSyncin classCoreExecution
-