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 SummaryFieldsModifier 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.PvmExecutionImplactivity, 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.CoreExecutionbusinessKey, businessKeyWithoutCascade, eventName, eventSource, id, listenerIndex, skipCustomListeners, skipIoMapping, skipSubprocesses, tenantIdFields inherited from class org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScopecachedElContext
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.PvmExecutionImplactivityInstanceDone, 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.CoreExecutiongetBusinessKeyWithoutCascade, 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.AbstractVariableScopecollectVariableNames, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecutioncreateActivityExecutionMapping, 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.BaseDelegateExecutiongetEventNameMethods inherited from interface org.camunda.bpm.engine.delegate.DelegateExecutioncreateIncident, createIncident, getCurrentActivityId, getCurrentTransitionId, getParentId, getTenantId, isCanceled, resolveIncident, setProcessBusinessKey, setVariableMethods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmExecutiongetActivity, getVariable, getVariables, hasVariable, setVariable, signalMethods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmProcessInstancedeleteCascade, findActiveActivityIds, findExecution, findExecutions, isEnded, start, startMethods inherited from interface org.camunda.bpm.engine.delegate.VariableScopegetVariable, 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- 
processInstancethe process instance. this is the root of the execution tree. the processInstance of a process instance is a self reference.
- 
parentthe parent execution
- 
executionsnested executions representing scopes or concurrent paths
- 
superExecutionsuper execution, not-null if this execution is part of a subprocess
- 
subProcessInstancereference to a subprocessinstance, not-null if currently subprocess is started from this execution
- 
superCaseExecutionsuper case execution, not-null if this execution is part of a case execution
- 
subCaseInstancereference to a subcaseinstance, not-null if currently subcase is started from this execution
- 
variableStore
 
- 
- 
Constructor Details- 
ExecutionImplpublic ExecutionImpl()
 
- 
- 
Method Details- 
createExecutioncreates a new execution. properties processDefinition, processInstance and activity will be initialized.- Specified by:
- createExecutionin interface- ActivityExecution
- Specified by:
- createExecutionin class- PvmExecutionImpl
 
- 
newExecutioninstantiates a new execution. can be overridden by subclasses- Specified by:
- newExecutionin class- PvmExecutionImpl
 
- 
initializepublic void initialize()- Specified by:
- initializein class- PvmExecutionImpl
 
- 
initializeTimerDeclarationspublic void initializeTimerDeclarations()- Specified by:
- initializeTimerDeclarationsin class- PvmExecutionImpl
 
- 
getParentensures initialization and returns the parent- Specified by:
- getParentin interface- ActivityExecution
- Specified by:
- getParentin class- PvmExecutionImpl
 
- 
setParentExecutionDescription copied from class:PvmExecutionImplUse #setParent to also update the child execution sets- Specified by:
- setParentExecutionin class- PvmExecutionImpl
 
- 
getExecutionsAsCopy- Specified by:
- getExecutionsAsCopyin class- PvmExecutionImpl
 
- 
getExecutionsensures initialization and returns the non-null executions list- Specified by:
- getExecutionsin interface- ActivityExecution
- Specified by:
- getExecutionsin class- PvmExecutionImpl
 
- 
getSuperExecutionDescription 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 interface- DelegateExecution
- Specified by:
- getSuperExecutionin class- PvmExecutionImpl
- Returns:
- the super execution or null.
 
- 
setSuperExecution- Specified by:
- setSuperExecutionin class- PvmExecutionImpl
 
- 
getSubProcessInstance- Specified by:
- getSubProcessInstancein class- PvmExecutionImpl
 
- 
setSubProcessInstance- Specified by:
- setSubProcessInstancein class- PvmExecutionImpl
 
- 
getSuperCaseExecution- Specified by:
- getSuperCaseExecutionin class- PvmExecutionImpl
 
- 
setSuperCaseExecution- Specified by:
- setSuperCaseExecutionin class- PvmExecutionImpl
 
- 
getSubCaseInstance- Specified by:
- getSubCaseInstancein class- PvmExecutionImpl
 
- 
setSubCaseInstance- Specified by:
- setSubCaseInstancein class- PvmExecutionImpl
 
- 
createSubCaseInstanceDescription copied from interface:ActivityExecutionCreates a new sub case instance. Thisexecution will be the super execution of the created sub case instance.- Specified by:
- createSubCaseInstancein interface- ActivityExecution
- Specified by:
- createSubCaseInstancein class- PvmExecutionImpl
- Parameters:
- caseDefinition- The- CmmnCaseDefinitionof the sub case instance.
 
- 
createSubCaseInstancepublic 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 interface- ActivityExecution
- Specified by:
- createSubCaseInstancein class- PvmExecutionImpl
- Parameters:
- caseDefinition- The- CmmnCaseDefinitionof the sub case instance.
- businessKey- The businessKey to be set on sub case instance.
 
- 
getProcessDefinitionIdDescription copied from interface:DelegateExecutionThe process definition key for the process instance this execution is associated with.- Specified by:
- getProcessDefinitionIdin interface- DelegateExecution
 
- 
getProcessInstanceensures initialization and returns the process instance.- Specified by:
- getProcessInstancein interface- DelegateExecution
- Specified by:
- getProcessInstancein class- PvmExecutionImpl
 
- 
getProcessInstanceIdDescription copied from interface:DelegateExecutionReference to the overall process instance- Specified by:
- getProcessInstanceIdin interface- DelegateExecution
 
- 
getBusinessKeyDescription copied from interface:BaseDelegateExecutionThe business key for the root execution (e.g. process instance).- Specified by:
- getBusinessKeyin interface- BaseDelegateExecution
- Overrides:
- getBusinessKeyin class- PvmExecutionImpl
 
- 
setBusinessKey- Overrides:
- setBusinessKeyin class- CoreExecution
 
- 
getProcessBusinessKeyDescription copied from interface:DelegateExecutionThe business key for the process instance this execution is associated with.- Specified by:
- getProcessBusinessKeyin interface- DelegateExecution
- Overrides:
- getProcessBusinessKeyin class- PvmExecutionImpl
 
- 
setProcessInstancefor setting the process instance, this setter must be used as subclasses can override- Specified by:
- setProcessInstancein class- PvmExecutionImpl
 
- 
generateActivityInstanceIdgenerates an activity instance id- Specified by:
- generateActivityInstanceIdin class- PvmExecutionImpl
 
- 
toString- Overrides:
- toStringin class- PvmExecutionImpl
 
- 
getToStringIdentity- Overrides:
- getToStringIdentityin class- PvmExecutionImpl
 
- 
getIdDescription 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 interface- BaseDelegateExecution
- Overrides:
- getIdin class- CoreExecution
 
- 
getVariableStore- Specified by:
- getVariableStorein class- AbstractVariableScope
 
- 
getVariableInstanceFactory- Specified by:
- getVariableInstanceFactoryin class- AbstractVariableScope
 
- 
getVariableInstanceLifecycleListenersprotected List<VariableInstanceLifecycleListener<CoreVariableInstance>> getVariableInstanceLifecycleListeners()- Specified by:
- getVariableInstanceLifecycleListenersin class- AbstractVariableScope
 
- 
getReplacedByDescription 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 class- PvmExecutionImpl
 
- 
setExecutions
- 
getCurrentActivityNameDescription copied from interface:DelegateExecutionGets the name of the current activity.- Specified by:
- getCurrentActivityNamein interface- DelegateExecution
- Overrides:
- getCurrentActivityNamein class- PvmExecutionImpl
 
- 
getBpmnModelElementInstanceDescription 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 interface- BpmnModelExecutionContext
- Returns:
- the FlowElementcorresponding to the current Bpmn Model Element
 
- 
getBpmnModelInstanceDescription copied from interface:BpmnModelExecutionContextReturns theBpmnModelInstancefor the currently executed Bpmn Model- Specified by:
- getBpmnModelInstancein interface- BpmnModelExecutionContext
- Returns:
- the current BpmnModelInstance
 
- 
getProcessEngineServicesDescription copied from interface:ProcessEngineServicesAwareReturns theProcessEngineServicesproviding access to the public API of the process engine.- Specified by:
- getProcessEngineServicesin interface- ProcessEngineServicesAware
- Returns:
- the ProcessEngineServices.
 
- 
getProcessEngineDescription copied from interface:ProcessEngineServicesAwareReturns theProcessEngineproviding access to the public API of the process engine.- Specified by:
- getProcessEnginein interface- ProcessEngineServicesAware
- Returns:
- the ProcessEngine.
 
- 
forceUpdatepublic void forceUpdate()- Specified by:
- forceUpdatein interface- ActivityExecution
 
- 
fireHistoricProcessStartEventpublic void fireHistoricProcessStartEvent()- Specified by:
- fireHistoricProcessStartEventin class- PvmExecutionImpl
 
- 
removeVariablesLocalInternalprotected void removeVariablesLocalInternal()- Specified by:
- removeVariablesLocalInternalin class- PvmExecutionImpl
 
 
-