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
FieldsModifier and TypeFieldDescriptionprotected List<ExecutionImpl>nested executions representing scopes or concurrent pathsprotected ExecutionImplthe parent executionprotected ExecutionImplthe process instance.protected CaseExecutionImplreference to a subcaseinstance, not-null if currently subcase is started from this executionprotected ExecutionImplreference to a subprocessinstance, not-null if currently subprocess is started from this executionprotected CaseExecutionImplsuper case execution, not-null if this execution is part of a case executionprotected ExecutionImplsuper 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, transitionsToTakeFields 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 TypeMethodDescriptioncreates a new execution.createSubCaseInstance(CmmnCaseDefinition caseDefinition) Creates a new sub case instance.createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey) Creates a new sub case instance.voidvoidprotected StringgenerateActivityInstanceId(String activityId) generates an activity instance idReturns the currently executed Element in the BPMN Model.Returns theBpmnModelInstancefor 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 theProcessEngineproviding access to the public API of the process engine.Returns theProcessEngineServicesproviding 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 Stringprotected VariableInstanceFactory<CoreVariableInstance>protected VariableStore<CoreVariableInstance>voidvoidprotected ExecutionImplinstantiates a new execution.protected voidvoidsetBusinessKey(String businessKey) voidsetExecutions(List<ExecutionImpl> executions) voidsetParentExecution(PvmExecutionImpl parent) Use #setParent to also update the child execution setsvoidsetProcessInstance(PvmExecutionImpl processInstance) for setting the process instance, this setter must be used as subclasses can overridevoidsetSubCaseInstance(CmmnExecution subCaseInstance) voidsetSubProcessInstance(PvmExecutionImpl subProcessInstance) voidsetSuperCaseExecution(CmmnExecution superCaseExecution) voidsetSuperExecution(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, tryPruneLastConcurrentChildMethods 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, setTenantIdMethods 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, setVariablesLocalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, tryPruneLastConcurrentChildMethods inherited from interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
getEventNameMethods inherited from interface org.camunda.bpm.engine.delegate.DelegateExecution
createIncident, createIncident, getCurrentActivityId, getCurrentTransitionId, getParentId, getTenantId, isCanceled, resolveIncident, setProcessBusinessKey, setVariableMethods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmExecution
getActivity, getVariable, getVariables, hasVariable, setVariable, signalMethods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmProcessInstance
deleteCascade, findActiveActivityIds, findExecution, findExecutions, isEnded, start, startMethods 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:
createExecutionin interfaceActivityExecution- Specified by:
createExecutionin classPvmExecutionImpl
-
newExecution
instantiates a new execution. can be overridden by subclasses- Specified by:
newExecutionin classPvmExecutionImpl
-
initialize
public void initialize()- Specified by:
initializein classPvmExecutionImpl
-
initializeTimerDeclarations
public void initializeTimerDeclarations()- Specified by:
initializeTimerDeclarationsin classPvmExecutionImpl
-
getParent
ensures initialization and returns the parent- Specified by:
getParentin interfaceActivityExecution- Specified by:
getParentin classPvmExecutionImpl
-
setParentExecution
Description copied from class:PvmExecutionImplUse #setParent to also update the child execution sets- Specified by:
setParentExecutionin classPvmExecutionImpl
-
getExecutionsAsCopy
- Specified by:
getExecutionsAsCopyin classPvmExecutionImpl
-
getExecutions
ensures initialization and returns the non-null executions list- Specified by:
getExecutionsin interfaceActivityExecution- Specified by:
getExecutionsin classPvmExecutionImpl
-
getSuperExecution
Description copied from interface:DelegateExecutionIn 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:
getSuperExecutionin interfaceDelegateExecution- Specified by:
getSuperExecutionin classPvmExecutionImpl- Returns:
- the super execution or null.
-
setSuperExecution
- Specified by:
setSuperExecutionin classPvmExecutionImpl
-
getSubProcessInstance
- Specified by:
getSubProcessInstancein classPvmExecutionImpl
-
setSubProcessInstance
- Specified by:
setSubProcessInstancein classPvmExecutionImpl
-
getSuperCaseExecution
- Specified by:
getSuperCaseExecutionin classPvmExecutionImpl
-
setSuperCaseExecution
- Specified by:
setSuperCaseExecutionin classPvmExecutionImpl
-
getSubCaseInstance
- Specified by:
getSubCaseInstancein classPvmExecutionImpl
-
setSubCaseInstance
- Specified by:
setSubCaseInstancein classPvmExecutionImpl
-
createSubCaseInstance
Description copied from interface:ActivityExecutionCreates a new sub case instance.
Thisexecution will be the super execution of the created sub case instance.- Specified by:
createSubCaseInstancein interfaceActivityExecution- Specified by:
createSubCaseInstancein classPvmExecutionImpl- Parameters:
caseDefinition- TheCmmnCaseDefinitionof the sub case instance.
-
createSubCaseInstance
public CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey) Description copied from interface:ActivityExecutionCreates a new sub case instance.
Thisexecution will be the super execution of the created sub case instance.- Specified by:
createSubCaseInstancein interfaceActivityExecution- Specified by:
createSubCaseInstancein classPvmExecutionImpl- Parameters:
caseDefinition- TheCmmnCaseDefinitionof the sub case instance.businessKey- The businessKey to be set on sub case instance.
-
getProcessDefinitionId
Description copied from interface:DelegateExecutionThe process definition key for the process instance this execution is associated with.- Specified by:
getProcessDefinitionIdin interfaceDelegateExecution
-
getProcessInstance
ensures initialization and returns the process instance.- Specified by:
getProcessInstancein interfaceDelegateExecution- Specified by:
getProcessInstancein classPvmExecutionImpl
-
getProcessInstanceId
Description copied from interface:DelegateExecutionReference to the overall process instance- Specified by:
getProcessInstanceIdin interfaceDelegateExecution
-
getBusinessKey
Description copied from interface:BaseDelegateExecutionThe business key for the root execution (e.g. process instance).- Specified by:
getBusinessKeyin interfaceBaseDelegateExecution- Overrides:
getBusinessKeyin classPvmExecutionImpl
-
setBusinessKey
- Overrides:
setBusinessKeyin classCoreExecution
-
getProcessBusinessKey
Description copied from interface:DelegateExecutionThe business key for the process instance this execution is associated with.- Specified by:
getProcessBusinessKeyin interfaceDelegateExecution- Overrides:
getProcessBusinessKeyin classPvmExecutionImpl
-
setProcessInstance
for setting the process instance, this setter must be used as subclasses can override- Specified by:
setProcessInstancein classPvmExecutionImpl
-
generateActivityInstanceId
generates an activity instance id- Specified by:
generateActivityInstanceIdin classPvmExecutionImpl
-
toString
- Overrides:
toStringin classPvmExecutionImpl
-
getToStringIdentity
- Overrides:
getToStringIdentityin classPvmExecutionImpl
-
getId
Description copied from interface:BaseDelegateExecutionUnique 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:
getIdin interfaceBaseDelegateExecution- Overrides:
getIdin classCoreExecution
-
getVariableStore
- Specified by:
getVariableStorein classAbstractVariableScope
-
getVariableInstanceFactory
- Specified by:
getVariableInstanceFactoryin classAbstractVariableScope
-
getVariableInstanceLifecycleListeners
protected List<VariableInstanceLifecycleListener<CoreVariableInstance>> getVariableInstanceLifecycleListeners()- Specified by:
getVariableInstanceLifecycleListenersin classAbstractVariableScope
-
getReplacedBy
Description copied from class:PvmExecutionImplReturns 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:
getReplacedByin classPvmExecutionImpl
-
setExecutions
-
getCurrentActivityName
Description copied from interface:DelegateExecutionGets the name of the current activity.- Specified by:
getCurrentActivityNamein interfaceDelegateExecution- Overrides:
getCurrentActivityNamein classPvmExecutionImpl
-
getBpmnModelElementInstance
Description copied from interface:BpmnModelExecutionContextReturns the currently executed Element in the BPMN Model. This method returns a
FlowElementwhich 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 correspondingFlowNodeforExecutionListener.EVENTNAME_STARTandExecutionListener.EVENTNAME_ENDand the correspondingSequenceFlowforExecutionListener.EVENTNAME_TAKE.- Specified by:
getBpmnModelElementInstancein interfaceBpmnModelExecutionContext- Returns:
- the
FlowElementcorresponding to the current Bpmn Model Element
-
getBpmnModelInstance
Description copied from interface:BpmnModelExecutionContextReturns theBpmnModelInstancefor the currently executed Bpmn Model- Specified by:
getBpmnModelInstancein interfaceBpmnModelExecutionContext- Returns:
- the current
BpmnModelInstance
-
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.
-
forceUpdate
public void forceUpdate()- Specified by:
forceUpdatein interfaceActivityExecution
-
fireHistoricProcessStartEvent
public void fireHistoricProcessStartEvent()- Specified by:
fireHistoricProcessStartEventin classPvmExecutionImpl
-
removeVariablesLocalInternal
protected void removeVariablesLocalInternal()- Specified by:
removeVariablesLocalInternalin classPvmExecutionImpl
-