Class ExecutionImpl
- All Implemented Interfaces:
Serializable
,BaseDelegateExecution
,BpmnModelExecutionContext
,DelegateExecution
,ProcessEngineServicesAware
,VariableScope
,VariableEventDispatcher
,ActivityExecution
,PvmExecution
,PvmProcessInstance
- Author:
- Tom Baeyens, Joram Barrez, Daniel Meyer, Falko Menge
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<ExecutionImpl>
nested executions representing scopes or concurrent pathsprotected ExecutionImpl
the parent executionprotected ExecutionImpl
the process instance.protected CaseExecutionImpl
reference to a subcaseinstance, not-null if currently subcase is started from this executionprotected ExecutionImpl
reference to a subprocessinstance, not-null if currently subprocess is started from this executionprotected CaseExecutionImpl
super case execution, not-null if this execution is part of a case executionprotected ExecutionImpl
super execution, not-null if this execution is part of a subprocessprotected VariableStore<CoreVariableInstance>
Fields inherited from class org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl
activity, activityInstanceEndListenersFailed, activityInstanceId, activityInstanceState, caseInstanceId, delayedEvents, deleteReason, deleteRoot, externallyTerminated, ignoreAsync, isActive, isConcurrent, isEnded, isEventScope, isRemoved, isScope, isStarting, nextActivity, payloadForTriggeredScope, preserveScope, processDefinition, replacedBy, scopeInstantiationContext, sequenceCounter, transition, transitionsToTake
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 TypeMethodDescriptioncreates a new execution.createSubCaseInstance
(CmmnCaseDefinition caseDefinition) Creates a new sub case instance.createSubCaseInstance
(CmmnCaseDefinition caseDefinition, String businessKey) Creates a new sub case instance.void
void
protected String
generateActivityInstanceId
(String activityId) generates an activity instance idReturns the currently executed Element in the BPMN Model.Returns theBpmnModelInstance
for the currently executed Bpmn ModelThe business key for the root execution (e.g.Gets the name of the current activity.ensures initialization and returns the non-null executions listgetId()
Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states.ensures initialization and returns the parentThe business key for the process instance this execution is associated with.The process definition key for the process instance this execution is associated with.Returns theProcessEngine
providing access to the public API of the process engine.Returns theProcessEngineServices
providing access to the public API of the process engine.ensures initialization and returns the process instance.Reference to the overall process instanceReturns an execution that has replaced this execution for executing activities in their shared scope.In case this delegate execution is the process instance execution and this process instance was started by a call activity, this method returns the execution which executed the call activity in the super process instance.protected String
protected VariableInstanceFactory<CoreVariableInstance>
protected VariableStore<CoreVariableInstance>
void
void
protected ExecutionImpl
instantiates a new execution.protected void
void
setBusinessKey
(String businessKey) void
setExecutions
(List<ExecutionImpl> executions) void
setParentExecution
(PvmExecutionImpl parent) Use #setParent to also update the child execution setsvoid
setProcessInstance
(PvmExecutionImpl processInstance) for setting the process instance, this setter must be used as subclasses can overridevoid
setSubCaseInstance
(CmmnExecution subCaseInstance) void
setSubProcessInstance
(PvmExecutionImpl subProcessInstance) void
setSuperCaseExecution
(CmmnExecution superCaseExecution) void
setSuperExecution
(PvmExecutionImpl superExecution) toString()
Methods inherited from class org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl
activityInstanceDone, activityInstanceEndListenerFailure, activityInstanceStarted, activityInstanceStarting, clearDelayedEvents, clearScope, collectActiveActivityIds, collectExecutions, continueExecutionIfNotCanceled, continueIfExecutionDoesNotAffectNextOperation, createActivityExecutionMapping, createActivityExecutionMapping, createActivityExecutionMapping, createConcurrentExecution, createIncident, createIncident, createIncidentContext, createSubProcessInstance, createSubProcessInstance, createSubProcessInstance, delayEvent, delayEvent, deleteCascade, deleteCascade, deleteCascade, destroy, destroy, dispatchDelayedEventsAndPerformOperation, dispatchDelayedEventsAndPerformOperation, dispatchScopeEvents, disposeScopeInstantiationContext, end, endCompensation, enterActivityInstance, executeActivities, executeActivitiesConcurrent, executeActivity, executeEventHandlerActivity, executeIoMapping, findActiveActivityIds, findExecution, findExecutionForFlowScope, findExecutionForFlowScope, findExecutionForScope, findExecutions, findInactiveChildExecutions, findInactiveConcurrentExecutions, findIncidentHandler, getActivity, getActivityId, getActivityInstanceId, getActivityInstanceState, getAllChildExecutions, getCaseInstanceId, getCurrentActivityId, getCurrentTransitionId, getDelayedEvents, getDeleteReason, getEventScopeExecutions, getFlowScope, getFlowScopeExecution, getNextActivity, getNonEventScopeExecutions, getParentActivityInstanceId, getParentId, getParentScopeExecution, getParentVariableScope, getPayloadForTriggeredScope, getProcessDefinition, getScopeActivity, getScopeInstantiationContext, getSequenceCounter, getTransition, getTransitionsToTake, getVariableScopeKey, hasChildren, hasFailedOnEndListeners, hasReplacedParent, inactivate, incrementSequenceCounter, initActivityIds, instantiateScopes, interrupt, interrupt, isActive, isActive, isAsyncAfterScopeWithoutTransition, isCanceled, isCompleteScope, isConcurrent, isDeleteRoot, isEnded, isEventScope, isExecutingScopeLeafActivity, isExternallyTerminated, isIgnoreAsync, isInState, isPreserveScope, isProcessInstanceExecution, isProcessInstanceStarting, isRemoved, isReplacedByParent, isScope, isStarting, leaveActivityInstance, leaveActivityViaTransition, leaveActivityViaTransitions, onConcurrentExpand, propagateEnd, remove, removeAllTasks, removeEventScopes, replace, resolveIncident, resolveReplacedBy, setActive, setActivity, setActivityInstanceId, setCanceled, setCaseInstanceId, setCompleteScope, setConcurrent, setDelayedPayloadToNewScope, setDeleteReason, setDeleteRoot, setEnded, setEventScope, setExternallyTerminated, setIgnoreAsync, setNextActivity, setParent, setPayloadForTriggeredScope, setPreserveScope, setProcessBusinessKey, setProcessDefinition, setProcessInstanceStarting, setScope, setSequenceCounter, setStartContext, setStarting, setTransition, setTransitionsToTake, setVariable, signal, start, start, start, startWithFormProperties, startWithoutExecuting, take, tryPruneLastConcurrentChild
Methods inherited from class org.camunda.bpm.engine.impl.core.instance.CoreExecution
getBusinessKeyWithoutCascade, getEventName, getEventSource, getListenerIndex, getTenantId, invokeListener, isSkipCustomListeners, isSkipIoMappings, isSkipSubprocesses, performOperation, performOperationSync, setEventName, setEventSource, setId, setListenerIndex, setSkipCustomListeners, setSkipIoMappings, setSkipSubprocesseses, setTenantId
Methods inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
collectVariableNames, collectVariables, dispatchEvent, 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.impl.pvm.delegate.ActivityExecution
createActivityExecutionMapping, createSubProcessInstance, createSubProcessInstance, createSubProcessInstance, destroy, end, endCompensation, enterActivityInstance, executeActivity, findExecutionForFlowScope, findInactiveChildExecutions, findInactiveConcurrentExecutions, getActivity, getActivityInstanceId, getNextActivity, getNonEventScopeExecutions, getParentActivityInstanceId, getTransition, hasChildren, inactivate, interrupt, isActive, isCompleteScope, isConcurrent, isEnded, isProcessInstanceExecution, isScope, leaveActivityInstance, leaveActivityViaTransition, leaveActivityViaTransitions, remove, setActive, setActivity, setActivityInstanceId, setConcurrent, setEnded, setIgnoreAsync, setScope, signal, tryPruneLastConcurrentChild
Methods inherited from interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
getEventName
Methods inherited from interface org.camunda.bpm.engine.delegate.DelegateExecution
createIncident, createIncident, getCurrentActivityId, getCurrentTransitionId, getParentId, getTenantId, isCanceled, resolveIncident, setProcessBusinessKey, setVariable
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmExecution
getActivity, getVariable, getVariables, hasVariable, setVariable, signal
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmProcessInstance
deleteCascade, findActiveActivityIds, findExecution, findExecutions, isEnded, start, start
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
getVariable, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariableScopeKey, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
-
Field Details
-
processInstance
the process instance. this is the root of the execution tree. the processInstance of a process instance is a self reference. -
parent
the parent execution -
executions
nested executions representing scopes or concurrent paths -
superExecution
super execution, not-null if this execution is part of a subprocess -
subProcessInstance
reference to a subprocessinstance, not-null if currently subprocess is started from this execution -
superCaseExecution
super case execution, not-null if this execution is part of a case execution -
subCaseInstance
reference to a subcaseinstance, not-null if currently subcase is started from this execution -
variableStore
-
-
Constructor Details
-
ExecutionImpl
public ExecutionImpl()
-
-
Method Details
-
createExecution
creates a new execution. properties processDefinition, processInstance and activity will be initialized.- Specified by:
createExecution
in interfaceActivityExecution
- Specified by:
createExecution
in classPvmExecutionImpl
-
newExecution
instantiates a new execution. can be overridden by subclasses- Specified by:
newExecution
in classPvmExecutionImpl
-
initialize
public void initialize()- Specified by:
initialize
in classPvmExecutionImpl
-
initializeTimerDeclarations
public void initializeTimerDeclarations()- Specified by:
initializeTimerDeclarations
in classPvmExecutionImpl
-
getParent
ensures initialization and returns the parent- Specified by:
getParent
in interfaceActivityExecution
- Specified by:
getParent
in classPvmExecutionImpl
-
setParentExecution
Description copied from class:PvmExecutionImpl
Use #setParent to also update the child execution sets- Specified by:
setParentExecution
in classPvmExecutionImpl
-
getExecutionsAsCopy
- Specified by:
getExecutionsAsCopy
in classPvmExecutionImpl
-
getExecutions
ensures initialization and returns the non-null executions list- Specified by:
getExecutions
in interfaceActivityExecution
- Specified by:
getExecutions
in classPvmExecutionImpl
-
getSuperExecution
Description copied from interface:DelegateExecution
In case this delegate execution is the process instance execution and this process instance was started by a call activity, this method returns the execution which executed the call activity in the super process instance.- Specified by:
getSuperExecution
in interfaceDelegateExecution
- Specified by:
getSuperExecution
in classPvmExecutionImpl
- Returns:
- the super execution or null.
-
setSuperExecution
- Specified by:
setSuperExecution
in classPvmExecutionImpl
-
getSubProcessInstance
- Specified by:
getSubProcessInstance
in classPvmExecutionImpl
-
setSubProcessInstance
- Specified by:
setSubProcessInstance
in classPvmExecutionImpl
-
getSuperCaseExecution
- Specified by:
getSuperCaseExecution
in classPvmExecutionImpl
-
setSuperCaseExecution
- Specified by:
setSuperCaseExecution
in classPvmExecutionImpl
-
getSubCaseInstance
- Specified by:
getSubCaseInstance
in classPvmExecutionImpl
-
setSubCaseInstance
- Specified by:
setSubCaseInstance
in classPvmExecutionImpl
-
createSubCaseInstance
Description copied from interface:ActivityExecution
Creates a new sub case instance.
This
execution will be the super execution of the created sub case instance.- Specified by:
createSubCaseInstance
in interfaceActivityExecution
- Specified by:
createSubCaseInstance
in classPvmExecutionImpl
- Parameters:
caseDefinition
- TheCmmnCaseDefinition
of the sub case instance.
-
createSubCaseInstance
public CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey) Description copied from interface:ActivityExecution
Creates a new sub case instance.
This
execution will be the super execution of the created sub case instance.- Specified by:
createSubCaseInstance
in interfaceActivityExecution
- Specified by:
createSubCaseInstance
in classPvmExecutionImpl
- Parameters:
caseDefinition
- TheCmmnCaseDefinition
of the sub case instance.businessKey
- The businessKey to be set on sub case instance.
-
getProcessDefinitionId
Description copied from interface:DelegateExecution
The process definition key for the process instance this execution is associated with.- Specified by:
getProcessDefinitionId
in interfaceDelegateExecution
-
getProcessInstance
ensures initialization and returns the process instance.- Specified by:
getProcessInstance
in interfaceDelegateExecution
- Specified by:
getProcessInstance
in classPvmExecutionImpl
-
getProcessInstanceId
Description copied from interface:DelegateExecution
Reference to the overall process instance- Specified by:
getProcessInstanceId
in interfaceDelegateExecution
-
getBusinessKey
Description copied from interface:BaseDelegateExecution
The business key for the root execution (e.g. process instance).- Specified by:
getBusinessKey
in interfaceBaseDelegateExecution
- Overrides:
getBusinessKey
in classPvmExecutionImpl
-
setBusinessKey
- Overrides:
setBusinessKey
in classCoreExecution
-
getProcessBusinessKey
Description copied from interface:DelegateExecution
The business key for the process instance this execution is associated with.- Specified by:
getProcessBusinessKey
in interfaceDelegateExecution
- Overrides:
getProcessBusinessKey
in classPvmExecutionImpl
-
setProcessInstance
for setting the process instance, this setter must be used as subclasses can override- Specified by:
setProcessInstance
in classPvmExecutionImpl
-
generateActivityInstanceId
generates an activity instance id- Specified by:
generateActivityInstanceId
in classPvmExecutionImpl
-
toString
- Overrides:
toString
in classPvmExecutionImpl
-
getToStringIdentity
- Overrides:
getToStringIdentity
in classPvmExecutionImpl
-
getId
Description copied from interface:BaseDelegateExecution
Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states.- Specified by:
getId
in interfaceBaseDelegateExecution
- Overrides:
getId
in classCoreExecution
-
getVariableStore
- Specified by:
getVariableStore
in classAbstractVariableScope
-
getVariableInstanceFactory
- Specified by:
getVariableInstanceFactory
in classAbstractVariableScope
-
getVariableInstanceLifecycleListeners
protected List<VariableInstanceLifecycleListener<CoreVariableInstance>> getVariableInstanceLifecycleListeners()- Specified by:
getVariableInstanceLifecycleListeners
in classAbstractVariableScope
-
getReplacedBy
Description copied from class:PvmExecutionImpl
Returns an execution that has replaced this execution for executing activities in their shared scope.
Invariant: this execution and getReplacedBy() execute in the same scope.
- Specified by:
getReplacedBy
in classPvmExecutionImpl
-
setExecutions
-
getCurrentActivityName
Description copied from interface:DelegateExecution
Gets the name of the current activity.- Specified by:
getCurrentActivityName
in interfaceDelegateExecution
- Overrides:
getCurrentActivityName
in classPvmExecutionImpl
-
getBpmnModelElementInstance
Description copied from interface:BpmnModelExecutionContext
Returns the currently executed Element in the BPMN Model. This method returns a
FlowElement
which may be casted to the concrete type of the Bpmn Model Element currently executed.If called from a Service
ExecutionListener
, the method will return the correspondingFlowNode
forExecutionListener.EVENTNAME_START
andExecutionListener.EVENTNAME_END
and the correspondingSequenceFlow
forExecutionListener.EVENTNAME_TAKE
.- Specified by:
getBpmnModelElementInstance
in interfaceBpmnModelExecutionContext
- Returns:
- the
FlowElement
corresponding to the current Bpmn Model Element
-
getBpmnModelInstance
Description copied from interface:BpmnModelExecutionContext
Returns theBpmnModelInstance
for the currently executed Bpmn Model- Specified by:
getBpmnModelInstance
in interfaceBpmnModelExecutionContext
- Returns:
- the current
BpmnModelInstance
-
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
.
-
forceUpdate
public void forceUpdate()- Specified by:
forceUpdate
in interfaceActivityExecution
-
fireHistoricProcessStartEvent
public void fireHistoricProcessStartEvent()- Specified by:
fireHistoricProcessStartEvent
in classPvmExecutionImpl
-
removeVariablesLocalInternal
protected void removeVariablesLocalInternal()- Specified by:
removeVariablesLocalInternal
in classPvmExecutionImpl
-