public abstract class PvmExecutionImpl extends CoreExecution implements ActivityExecution, PvmProcessInstance
Modifier and Type | Field and Description |
---|---|
protected ActivityImpl |
activity
current activity
|
protected String |
activityInstanceId
the unique id of the current activity instance
|
protected int |
activityInstanceState
marks the current activity instance
|
protected String |
caseInstanceId
the id of a case associated with this execution
|
protected List<DelayedVariableEvent> |
delayedEvents
Contains the delayed variable events, which will be dispatched on a save point.
|
protected String |
deleteReason |
protected boolean |
deleteRoot |
protected boolean |
externallyTerminated |
protected boolean |
isActive
indicates if this execution represents an active path of execution.
|
protected boolean |
isConcurrent |
protected boolean |
isEnded |
protected boolean |
isEventScope |
protected boolean |
isScope |
protected PvmActivity |
nextActivity
the activity which is to be started next
|
protected boolean |
preserveScope
transient; used for process instance modification to preserve a scope from getting deleted
|
protected ProcessDefinitionImpl |
processDefinition |
protected PvmExecutionImpl |
replacedBy |
protected long |
sequenceCounter |
protected ExecutionStartContext |
startContext |
protected TransitionImpl |
transition
the transition that is currently being taken
|
protected List<PvmTransition> |
transitionsToTake
A list of outgoing transitions from the current activity
that are going to be taken
|
businessKey, eventName, eventSource, id, listenerIndex, skipCustomListeners, skipIoMapping, tenantId
cachedElContext
Constructor and Description |
---|
PvmExecutionImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activityInstanceDone() |
void |
activityInstanceStarted() |
void |
activityInstanceStarting() |
void |
clearDelayedEvents()
Cleares the current delayed variable events.
|
void |
clearScope(String reason,
boolean skipCustomListeners,
boolean skipIoMappings) |
protected void |
collectActiveActivityIds(List<String> activeActivityIds) |
protected void |
collectExecutions(String activityId,
List<PvmExecution> executions) |
protected void |
continueExecutionIfNotCanceled(Callback<PvmExecutionImpl,Void> continuation,
PvmExecutionImpl execution) |
void |
continueIfExecutionDoesNotAffectNextOperation(Callback<PvmExecutionImpl,Void> dispatching,
Callback<PvmExecutionImpl,Void> continuation,
PvmExecutionImpl execution)
Executes the given depending operations with the given execution.
|
Map<ScopeImpl,PvmExecutionImpl> |
createActivityExecutionMapping()
Returns a mapping from scope activities to scope executions for all scopes that
are ancestors of the activity currently executed by this execution.
|
Map<ScopeImpl,PvmExecutionImpl> |
createActivityExecutionMapping(ScopeImpl currentScope) |
protected Map<ScopeImpl,PvmExecutionImpl> |
createActivityExecutionMapping(ScopeImpl currentScope,
Map<ScopeImpl,PvmExecutionImpl> mapping)
Creates an extended mapping based on this execution and the given existing mapping.
|
PvmExecutionImpl |
createConcurrentExecution() |
PvmExecutionImpl |
createExecution()
creates a new execution.
|
abstract PvmExecutionImpl |
createExecution(boolean initStartContext)
creates a new execution.
|
abstract CmmnExecution |
createSubCaseInstance(CmmnCaseDefinition caseDefinition)
Creates a new sub case instance.
|
abstract CmmnExecution |
createSubCaseInstance(CmmnCaseDefinition caseDefinition,
String businessKey)
Creates a new sub case instance.
|
PvmExecutionImpl |
createSubProcessInstance(PvmProcessDefinition processDefinition)
creates a new sub process instance.
|
PvmExecutionImpl |
createSubProcessInstance(PvmProcessDefinition processDefinition,
String businessKey) |
PvmExecutionImpl |
createSubProcessInstance(PvmProcessDefinition processDefinition,
String businessKey,
String caseInstanceId) |
void |
delayEvent(DelayedVariableEvent delayedVariableEvent)
Delays and stores the given DelayedVariableEvent on the process instance.
|
void |
delayEvent(PvmExecutionImpl targetScope,
VariableEvent variableEvent)
Delays a given variable event with the given target scope.
|
void |
deleteCascade(String deleteReason) |
void |
deleteCascade(String deleteReason,
boolean skipCustomListeners) |
void |
deleteCascade(String deleteReason,
boolean skipCustomListeners,
boolean skipIoMappings) |
void |
deleteCascade(String deleteReason,
boolean skipCustomListeners,
boolean skipIoMappings,
boolean externallyTerminated) |
void |
deleteCascade2(String deleteReason) |
void |
deletePropagate(String deleteReason,
boolean skipCustomListeners,
boolean skipIoMappings) |
void |
destroy() |
void |
dispatchDelayedEventsAndPerformOperation(Callback<PvmExecutionImpl,Void> continuation)
Dispatches the current delayed variable events and performs the given atomic operation
if the current state was not changed.
|
void |
dispatchDelayedEventsAndPerformOperation(PvmAtomicOperation atomicOperation)
Dispatches the current delayed variable events and performs the given atomic operation
if the current state was not changed.
|
protected void |
dispatchScopeEvents(PvmExecutionImpl execution)
Dispatches the current delayed variable events on the scope of the given execution.
|
void |
disposeExecutionStartContext() |
void |
disposeProcessInstanceStartContext() |
void |
end(boolean completeScope)
Ends an execution.
|
void |
endCompensation()
Execution finished compensation.
|
void |
enterActivityInstance()
invoked to notify the execution that a new activity instance is started
|
void |
executeActivities(List<PvmActivity> activityStack,
PvmActivity targetActivity,
PvmTransition targetTransition,
Map<String,Object> variables,
Map<String,Object> localVariables,
boolean skipCustomListeners,
boolean skipIoMappings)
Instantiates the given activity stack.
|
void |
executeActivitiesConcurrent(List<PvmActivity> activityStack,
PvmActivity targetActivity,
PvmTransition targetTransition,
Map<String,Object> variables,
Map<String,Object> localVariables,
boolean skipCustomListeners,
boolean skipIoMappings)
Instantiates the given activity stack under this execution.
|
void |
executeActivity(PvmActivity activity)
Execute an activity which is not contained in normal flow (having no incoming sequence flows).
|
void |
executeEventHandlerActivity(ActivityImpl eventHandlerActivity) |
void |
executeIoMapping() |
List<String> |
findActiveActivityIds() |
PvmExecutionImpl |
findExecution(String activityId) |
PvmExecutionImpl |
findExecutionForFlowScope(PvmScope targetFlowScope)
For a given target flow scope, this method returns the corresponding scope execution.
|
protected PvmExecutionImpl |
findExecutionForFlowScope(String targetScopeId) |
PvmExecutionImpl |
findExecutionForScope(ScopeImpl currentScope,
ScopeImpl targetScope) |
List<PvmExecution> |
findExecutions(String activityId) |
List<ActivityExecution> |
findInactiveChildExecutions(PvmActivity activity) |
List<ActivityExecution> |
findInactiveConcurrentExecutions(PvmActivity activity)
Retrieves all executions which are concurrent and inactive at the given activity.
|
abstract void |
fireHistoricProcessStartEvent() |
protected abstract String |
generateActivityInstanceId(String activityId) |
ActivityImpl |
getActivity()
ensures initialization and returns the activity
|
String |
getActivityId() |
String |
getActivityInstanceId()
return the Id of the activity instance currently executed by this execution
|
int |
getActivityInstanceState() |
protected List<PvmExecutionImpl> |
getAllChildExecutions() |
String |
getCaseInstanceId() |
String |
getCurrentActivityId()
Gets the id of the current activity.
|
String |
getCurrentActivityName()
Gets the name of the current activity.
|
String |
getCurrentTransitionId()
return the Id of the current transition
|
List<DelayedVariableEvent> |
getDelayedEvents()
The current delayed variable events.
|
String |
getDeleteReason() |
List<? extends PvmExecutionImpl> |
getEventScopeExecutions() |
abstract List<? extends PvmExecutionImpl> |
getExecutions()
returns the list of execution of which this execution the parent of.
|
abstract List<? extends PvmExecutionImpl> |
getExecutionsAsCopy() |
ExecutionStartContext |
getExecutionStartContext() |
protected ScopeImpl |
getFlowScope() |
protected PvmExecutionImpl |
getFlowScopeExecution() |
PvmActivity |
getNextActivity()
An activity which is to be started next.
|
List<? extends PvmExecutionImpl> |
getNonEventScopeExecutions()
returns child executions that are not event scope executions.
|
abstract PvmExecutionImpl |
getParent()
ensures initialization and returns the parent
|
String |
getParentActivityInstanceId()
return the Id of the parent activity instance currently executed by this execution
|
String |
getParentId()
Gets the id of the parent of this execution.
|
PvmExecutionImpl |
getParentScopeExecution(boolean considerSuperExecution) |
AbstractVariableScope |
getParentVariableScope() |
String |
getProcessBusinessKey()
The business key for the process instance this execution is associated
with.
|
ProcessDefinitionImpl |
getProcessDefinition() |
abstract PvmExecutionImpl |
getProcessInstance()
ensures initialization and returns the process instance.
|
ProcessInstanceStartContext |
getProcessInstanceStartContext() |
abstract PvmExecutionImpl |
getReplacedBy()
Returns an execution that has replaced this execution for executing activities in their shared scope.
|
protected ScopeImpl |
getScopeActivity() |
long |
getSequenceCounter() |
abstract CmmnExecution |
getSubCaseInstance() |
abstract PvmExecutionImpl |
getSubProcessInstance() |
abstract CmmnExecution |
getSuperCaseExecution() |
abstract PvmExecutionImpl |
getSuperExecution()
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 |
getToStringIdentity() |
TransitionImpl |
getTransition() |
List<PvmTransition> |
getTransitionsToTake() |
String |
getVariableScopeKey() |
boolean |
hasChildren() |
boolean |
hasProcessInstanceStartContext() |
boolean |
hasReplacedParent() |
void |
inactivate()
Inactivates this execution.
|
void |
incrementSequenceCounter() |
protected void |
initActivityIds(List<DelayedVariableEvent> delayedEvents,
Map<PvmExecutionImpl,String> activityInstanceIds,
Map<PvmExecutionImpl,String> activityIds)
Initializes the given maps with the target scopes and current activity id's and activity instance id's.
|
abstract void |
initialize() |
abstract void |
initializeTimerDeclarations() |
Map<PvmActivity,PvmExecutionImpl> |
instantiateScopes(List<PvmActivity> activityStack,
boolean skipCustomListeners,
boolean skipIoMappings)
Instantiates the given set of activities and returns the execution for the bottom-most activity
|
void |
interrupt(String reason)
Interrupts an execution
|
void |
interrupt(String reason,
boolean skipCustomListeners,
boolean skipIoMappings) |
boolean |
isActive()
returns whether this execution is currently active.
|
boolean |
isActive(String activityId) |
boolean |
isCanceled()
Returns whether this execution has been canceled.
|
boolean |
isCompleteScope()
Returns whether this execution completed the parent scope.
|
boolean |
isConcurrent()
returns whether this execution is concurrent or not.
|
boolean |
isDeleteRoot() |
boolean |
isEnded()
returns whether this execution has ended or not.
|
boolean |
isEventScope() |
boolean |
isExternallyTerminated() |
boolean |
isInState(ActivityInstanceState state) |
boolean |
isPreserveScope() |
boolean |
isProcessInstanceExecution()
returns whether this execution is a process instance or not.
|
boolean |
isReplacedByParent() |
boolean |
isScope()
Returns whether this execution is a scope.
|
void |
leaveActivityInstance()
invoked to notify the execution that an activity instance is ended.
|
void |
leaveActivityViaTransition(PvmTransition outgoingTransition) |
void |
leaveActivityViaTransitions(List<PvmTransition> _transitions,
List<? extends ActivityExecution> _recyclableExecutions)
Takes the given outgoing transitions, and potentially reusing
the given list of executions that were previously joined.
|
protected abstract PvmExecutionImpl |
newExecution() |
void |
onConcurrentExpand(PvmExecutionImpl scopeExecution)
Callback on tree expansion when this execution is used as the concurrent execution
where the argument's children become a subordinate to.
|
void |
propagateEnd()
Precondition: execution is already ended but this has not been propagated yet.
|
void |
remove() |
void |
removeAllTasks() |
protected void |
removeEventScopes() |
protected abstract void |
removeVariablesLocalInternal() |
void |
replace(PvmExecutionImpl execution)
Replace an execution by this execution.
|
PvmExecutionImpl |
resolveReplacedBy()
Instead of
getReplacedBy() , which returns the execution that this execution was directly replaced with,
this resolves the chain of replacements (i.e. |
void |
setActive(boolean isActive)
makes this execution active or inactive.
|
void |
setActivity(PvmActivity activity) |
void |
setActivityInstanceId(String activityInstanceId) |
void |
setCanceled(boolean canceled) |
void |
setCaseInstanceId(String caseInstanceId) |
void |
setCompleteScope(boolean completeScope) |
void |
setConcurrent(boolean isConcurrent)
changes the concurrent indicator on this execution.
|
void |
setDeleteReason(String deleteReason) |
void |
setDeleteRoot(boolean deleteRoot) |
void |
setEnded(boolean isEnded) |
void |
setEventScope(boolean isEventScope) |
void |
setExternallyTerminated(boolean externallyTerminated) |
void |
setNextActivity(PvmActivity nextActivity) |
void |
setParent(PvmExecutionImpl parent)
Sets the execution's parent and updates the old and new parents' set of
child executions
|
abstract void |
setParentExecution(PvmExecutionImpl parent)
Use #setParent to also update the child execution sets
|
void |
setPreserveScope(boolean preserveScope) |
void |
setProcessDefinition(ProcessDefinitionImpl processDefinition) |
abstract void |
setProcessInstance(PvmExecutionImpl pvmExecutionImpl) |
void |
setScope(boolean isScope)
Changes whether this execution is a scope or not
|
void |
setSequenceCounter(long sequenceCounter) |
void |
setStartContext(ExecutionStartContext startContext) |
abstract void |
setSubCaseInstance(CmmnExecution subCaseInstance) |
abstract void |
setSubProcessInstance(PvmExecutionImpl subProcessInstance) |
abstract void |
setSuperCaseExecution(CmmnExecution superCaseExecution) |
abstract void |
setSuperExecution(PvmExecutionImpl superExecution) |
void |
setTransition(PvmTransition transition) |
void |
setTransitionsToTake(List<PvmTransition> transitionsToTake) |
void |
setVariable(String variableName,
Object value,
String activityId)
Method to store variable in a specific scope identified by activity ID.
|
void |
signal(String signalName,
Object signalData) |
void |
start() |
void |
start(Map<String,Object> variables) |
void |
startWithoutExecuting(Map<String,Object> variables)
perform starting behavior but don't execute the initial activity
|
void |
take() |
String |
toString() |
boolean |
tryPruneLastConcurrentChild() |
getBusinessKey, getEventName, getEventSource, getId, getListenerIndex, getTenantId, invokeListener, isSkipCustomListeners, isSkipIoMappings, performOperation, performOperationSync, setBusinessKey, setEventName, setEventSource, setId, setListenerIndex, setSkipCustomListeners, setSkipIoMappings, setTenantId
checkJavaSerialization, collectVariableNames, collectVariables, dispatchEvent, getCachedElContext, getSourceActivityVariableScope, getValueFromVariableInstance, getVariable, getVariable, getVariableInstance, getVariableInstanceFactory, getVariableInstanceLifecycleListeners, getVariableInstanceLocal, getVariableInstancesLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariableStore, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersUpdate, invokeVariableLifecycleListenersUpdate, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariableLocalTransient, setVariables, setVariablesLocal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forceUpdate
getProcessDefinitionId, getProcessInstanceId, getTenantId
getBusinessKey, getEventName, getId
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
getBpmnModelElementInstance, getBpmnModelInstance
getProcessEngineServices
getVariable, getVariables, hasVariable, setVariable
protected transient ProcessDefinitionImpl processDefinition
protected transient ExecutionStartContext startContext
protected transient ActivityImpl activity
protected transient PvmActivity nextActivity
protected transient TransitionImpl transition
protected transient List<PvmTransition> transitionsToTake
protected String activityInstanceId
protected String caseInstanceId
protected PvmExecutionImpl replacedBy
protected boolean deleteRoot
protected String deleteReason
protected boolean externallyTerminated
protected boolean isActive
protected boolean isScope
protected boolean isConcurrent
protected boolean isEnded
protected boolean isEventScope
protected boolean preserveScope
protected int activityInstanceState
protected long sequenceCounter
protected transient List<DelayedVariableEvent> delayedEvents
public PvmExecutionImpl createExecution()
createExecution
in interface ActivityExecution
public abstract PvmExecutionImpl createExecution(boolean initStartContext)
ActivityExecution
createExecution
in interface ActivityExecution
public PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition)
ActivityExecution
createSubProcessInstance
in interface ActivityExecution
processDefinition
- The PvmProcessDefinition
of the subprocess.public PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey)
createSubProcessInstance
in interface ActivityExecution
processDefinition
- The PvmProcessDefinition
of the subprocess.businessKey
- the business key of the process instanceActivityExecution.createSubProcessInstance(PvmProcessDefinition)
public PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey, String caseInstanceId)
createSubProcessInstance
in interface ActivityExecution
processDefinition
- The PvmProcessDefinition
of the subprocess.businessKey
- the business key of the process instancecaseInstanceId
- the case instance id of the process instanceActivityExecution.createSubProcessInstance(PvmProcessDefinition)
protected abstract PvmExecutionImpl newExecution()
public abstract CmmnExecution createSubCaseInstance(CmmnCaseDefinition caseDefinition)
ActivityExecution
Creates a new sub case instance.
This
execution will be the super execution of the
created sub case instance.
createSubCaseInstance
in interface ActivityExecution
caseDefinition
- The CmmnCaseDefinition
of the sub case instance.public abstract CmmnExecution createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey)
ActivityExecution
Creates a new sub case instance.
This
execution will be the super execution of the
created sub case instance.
createSubCaseInstance
in interface ActivityExecution
caseDefinition
- The CmmnCaseDefinition
of the sub case instance.businessKey
- The businessKey to be set on sub case instance.public abstract void initialize()
public abstract void initializeTimerDeclarations()
public void executeIoMapping()
public void start()
start
in interface PvmProcessInstance
public void start(Map<String,Object> variables)
start
in interface PvmProcessInstance
public void startWithoutExecuting(Map<String,Object> variables)
variables
- the variables which are used for the startpublic abstract void fireHistoricProcessStartEvent()
public void destroy()
destroy
in interface ActivityExecution
public void removeAllTasks()
protected void removeEventScopes()
public void clearScope(String reason, boolean skipCustomListeners, boolean skipIoMappings)
public void interrupt(String reason)
interrupt
in interface ActivityExecution
public void interrupt(String reason, boolean skipCustomListeners, boolean skipIoMappings)
public void end(boolean completeScope)
end
in interface ActivityExecution
completeScope
- true if ending the execution contributes to completing the BPMN 2.0 scopepublic void endCompensation()
ActivityExecution
endCompensation
in interface ActivityExecution
public void propagateEnd()
Precondition: execution is already ended but this has not been propagated yet.
Propagates the ending of this execution to the flowscope execution; currently only supports the process instance execution
public void remove()
remove
in interface ActivityExecution
public PvmExecutionImpl createConcurrentExecution()
public boolean tryPruneLastConcurrentChild()
tryPruneLastConcurrentChild
in interface ActivityExecution
public void deleteCascade(String deleteReason)
deleteCascade
in interface PvmProcessInstance
public void deleteCascade(String deleteReason, boolean skipCustomListeners)
public void deleteCascade(String deleteReason, boolean skipCustomListeners, boolean skipIoMappings)
public void deletePropagate(String deleteReason, boolean skipCustomListeners, boolean skipIoMappings)
public void deleteCascade(String deleteReason, boolean skipCustomListeners, boolean skipIoMappings, boolean externallyTerminated)
public void deleteCascade2(String deleteReason)
public void executeEventHandlerActivity(ActivityImpl eventHandlerActivity)
public abstract PvmExecutionImpl getReplacedBy()
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.
public PvmExecutionImpl resolveReplacedBy()
getReplacedBy()
, which returns the execution that this execution was directly replaced with,
this resolves the chain of replacements (i.e. in the case the replacedBy execution itself was replaced again)public boolean hasReplacedParent()
public boolean isReplacedByParent()
public void replace(PvmExecutionImpl execution)
Replace an execution by this execution. The replaced execution has a pointer (getReplacedBy()
) to this execution.
This pointer is maintained until the replaced execution is removed or this execution is removed/ended.
This is used for two cases: Execution tree expansion and execution tree compaction
------- | e1 | scope -------After:
------- | e1 | scope ------- | ------- | e2 | cc (no scope) -------e2 replaces e1: it should receive all entities associated with the activity currently executed by e1; these are tasks, (local) variables, jobs (specific for the activity, not the scope)
------- | e1 | scope ------- | ------- | e2 | cc (no scope) -------After:
------- | e1 | scope -------e1 replaces e2: it should receive all entities associated with the activity currently executed by e2; these are tasks, (all) variables, all jobs
public void onConcurrentExpand(PvmExecutionImpl scopeExecution)
public void signal(String signalName, Object signalData)
signal
in interface ActivityExecution
signal
in interface PvmExecution
public void take()
public void executeActivity(PvmActivity activity)
First, the ActivityStartBehavior is evaluated.
In case the start behavior is not ActivityStartBehavior.DEFAULT
, the corresponding start
behavior is executed before executing the activity.
For a given activity, the execution on which this method must be called depends on the type of the start behavior:
PvmScope.getFlowScope()
PvmScope.getEventScope()
PvmScope.getEventScope()
executeActivity
in interface ActivityExecution
the
- activity to startpublic void executeActivitiesConcurrent(List<PvmActivity> activityStack, PvmActivity targetActivity, PvmTransition targetTransition, Map<String,Object> variables, Map<String,Object> localVariables, boolean skipCustomListeners, boolean skipIoMappings)
activityStack
- The most deeply nested activity is the last element in the listpublic Map<PvmActivity,PvmExecutionImpl> instantiateScopes(List<PvmActivity> activityStack, boolean skipCustomListeners, boolean skipIoMappings)
public void executeActivities(List<PvmActivity> activityStack, PvmActivity targetActivity, PvmTransition targetTransition, Map<String,Object> variables, Map<String,Object> localVariables, boolean skipCustomListeners, boolean skipIoMappings)
activityStack
- The most deeply nested activity is the last element in the listpublic List<ActivityExecution> findInactiveConcurrentExecutions(PvmActivity activity)
ActivityExecution
findInactiveConcurrentExecutions
in interface ActivityExecution
public List<ActivityExecution> findInactiveChildExecutions(PvmActivity activity)
findInactiveChildExecutions
in interface ActivityExecution
protected List<PvmExecutionImpl> getAllChildExecutions()
public void leaveActivityViaTransition(PvmTransition outgoingTransition)
leaveActivityViaTransition
in interface ActivityExecution
public void leaveActivityViaTransitions(List<PvmTransition> _transitions, List<? extends ActivityExecution> _recyclableExecutions)
ActivityExecution
leaveActivityViaTransitions
in interface ActivityExecution
protected abstract void removeVariablesLocalInternal()
public boolean isActive(String activityId)
public void inactivate()
ActivityExecution
inactivate
in interface ActivityExecution
public abstract List<? extends PvmExecutionImpl> getExecutions()
ActivityExecution
getExecutions
in interface ActivityExecution
public abstract List<? extends PvmExecutionImpl> getExecutionsAsCopy()
public List<? extends PvmExecutionImpl> getNonEventScopeExecutions()
ActivityExecution
getNonEventScopeExecutions
in interface ActivityExecution
public List<? extends PvmExecutionImpl> getEventScopeExecutions()
public PvmExecutionImpl findExecution(String activityId)
findExecution
in interface PvmProcessInstance
public List<PvmExecution> findExecutions(String activityId)
findExecutions
in interface PvmProcessInstance
protected void collectExecutions(String activityId, List<PvmExecution> executions)
public List<String> findActiveActivityIds()
findActiveActivityIds
in interface PvmProcessInstance
public String getProcessBusinessKey()
DelegateExecution
getProcessBusinessKey
in interface DelegateExecution
public void setProcessDefinition(ProcessDefinitionImpl processDefinition)
public ProcessDefinitionImpl getProcessDefinition()
public abstract PvmExecutionImpl getProcessInstance()
getProcessInstance
in interface DelegateExecution
public abstract void setProcessInstance(PvmExecutionImpl pvmExecutionImpl)
public String getCaseInstanceId()
public void setCaseInstanceId(String caseInstanceId)
public ActivityImpl getActivity()
getActivity
in interface ActivityExecution
getActivity
in interface PvmExecution
public String getActivityId()
public String getCurrentActivityName()
DelegateExecution
getCurrentActivityName
in interface DelegateExecution
public String getCurrentActivityId()
DelegateExecution
getCurrentActivityId
in interface DelegateExecution
public void setActivity(PvmActivity activity)
setActivity
in interface ActivityExecution
public void enterActivityInstance()
ActivityExecution
enterActivityInstance
in interface ActivityExecution
public void activityInstanceStarting()
public void activityInstanceStarted()
public void activityInstanceDone()
public void leaveActivityInstance()
ActivityExecution
leaveActivityInstance
in interface ActivityExecution
public String getParentActivityInstanceId()
ActivityExecution
getParentActivityInstanceId
in interface DelegateExecution
getParentActivityInstanceId
in interface ActivityExecution
public void setActivityInstanceId(String activityInstanceId)
setActivityInstanceId
in interface ActivityExecution
public String getActivityInstanceId()
ActivityExecution
getActivityInstanceId
in interface DelegateExecution
getActivityInstanceId
in interface ActivityExecution
public abstract PvmExecutionImpl getParent()
getParent
in interface ActivityExecution
public String getParentId()
DelegateExecution
getParentId
in interface DelegateExecution
public boolean hasChildren()
hasChildren
in interface ActivityExecution
public void setParent(PvmExecutionImpl parent)
public abstract void setParentExecution(PvmExecutionImpl parent)
public abstract PvmExecutionImpl getSuperExecution()
DelegateExecution
getSuperExecution
in interface DelegateExecution
public abstract void setSuperExecution(PvmExecutionImpl superExecution)
public abstract PvmExecutionImpl getSubProcessInstance()
public abstract void setSubProcessInstance(PvmExecutionImpl subProcessInstance)
public abstract CmmnExecution getSuperCaseExecution()
public abstract void setSuperCaseExecution(CmmnExecution superCaseExecution)
public abstract CmmnExecution getSubCaseInstance()
public abstract void setSubCaseInstance(CmmnExecution subCaseInstance)
protected ScopeImpl getScopeActivity()
public boolean isScope()
ActivityExecution
isScope
in interface ActivityExecution
public void setScope(boolean isScope)
ActivityExecution
setScope
in interface ActivityExecution
public PvmExecutionImpl findExecutionForFlowScope(PvmScope targetFlowScope)
Precondition: the execution is active and executing an activity. Can be invoked for scope and non scope executions.
findExecutionForFlowScope
in interface ActivityExecution
targetFlowScope
- scope activity or process definition for which the scope execution should be foundpublic PvmExecutionImpl findExecutionForScope(ScopeImpl currentScope, ScopeImpl targetScope)
public Map<ScopeImpl,PvmExecutionImpl> createActivityExecutionMapping(ScopeImpl currentScope)
public Map<ScopeImpl,PvmExecutionImpl> createActivityExecutionMapping()
ActivityExecution
ActivityExecution.getActivity()
is not null).createActivityExecutionMapping
in interface ActivityExecution
protected PvmExecutionImpl getFlowScopeExecution()
protected ScopeImpl getFlowScope()
protected Map<ScopeImpl,PvmExecutionImpl> createActivityExecutionMapping(ScopeImpl currentScope, Map<ScopeImpl,PvmExecutionImpl> mapping)
mapping
in mapping that corresponds to an ancestor scope of
currentScope
is reused.protected String getToStringIdentity()
public String getVariableScopeKey()
getVariableScopeKey
in interface VariableScope
getVariableScopeKey
in class AbstractVariableScope
public AbstractVariableScope getParentVariableScope()
getParentVariableScope
in class AbstractVariableScope
public void setVariable(String variableName, Object value, String activityId)
setVariable
in interface DelegateExecution
variableName
- - name of the variablevalue
- - value of the variableactivityId
- - activity ID which is associated with destination execution,
if not existing - exception will be thrownprotected PvmExecutionImpl findExecutionForFlowScope(String targetScopeId)
targetScopeId
- - destination scope to be found in current execution treepublic long getSequenceCounter()
public void setSequenceCounter(long sequenceCounter)
public void incrementSequenceCounter()
public boolean isExternallyTerminated()
public void setExternallyTerminated(boolean externallyTerminated)
public String getDeleteReason()
public void setDeleteReason(String deleteReason)
public boolean isDeleteRoot()
public void setDeleteRoot(boolean deleteRoot)
public TransitionImpl getTransition()
getTransition
in interface ActivityExecution
public List<PvmTransition> getTransitionsToTake()
public void setTransitionsToTake(List<PvmTransition> transitionsToTake)
public String getCurrentTransitionId()
DelegateExecution
getCurrentTransitionId
in interface DelegateExecution
public void setTransition(PvmTransition transition)
public boolean isConcurrent()
ActivityExecution
isConcurrent
in interface ActivityExecution
public void setConcurrent(boolean isConcurrent)
ActivityExecution
setConcurrent
in interface ActivityExecution
public boolean isActive()
ActivityExecution
isActive
in interface ActivityExecution
public void setActive(boolean isActive)
ActivityExecution
setActive
in interface ActivityExecution
public void setEnded(boolean isEnded)
setEnded
in interface ActivityExecution
public boolean isEnded()
ActivityExecution
isEnded
in interface ActivityExecution
isEnded
in interface PvmProcessInstance
public boolean isCanceled()
DelegateExecution
isCanceled
in interface DelegateExecution
public void setCanceled(boolean canceled)
public boolean isCompleteScope()
ActivityExecution
isCompleteScope
in interface ActivityExecution
public void setCompleteScope(boolean completeScope)
public void setPreserveScope(boolean preserveScope)
public boolean isPreserveScope()
public int getActivityInstanceState()
public boolean isInState(ActivityInstanceState state)
public boolean isEventScope()
public void setEventScope(boolean isEventScope)
public ExecutionStartContext getExecutionStartContext()
public void disposeProcessInstanceStartContext()
public void disposeExecutionStartContext()
public PvmActivity getNextActivity()
ActivityExecution
getNextActivity
in interface ActivityExecution
public boolean isProcessInstanceExecution()
ActivityExecution
isProcessInstanceExecution
in interface ActivityExecution
public ProcessInstanceStartContext getProcessInstanceStartContext()
public boolean hasProcessInstanceStartContext()
public void setStartContext(ExecutionStartContext startContext)
public void setNextActivity(PvmActivity nextActivity)
public PvmExecutionImpl getParentScopeExecution(boolean considerSuperExecution)
public void delayEvent(PvmExecutionImpl targetScope, VariableEvent variableEvent)
targetScope
- the target scope of the variable eventvariableEvent
- the variable event which should be delayedpublic void delayEvent(DelayedVariableEvent delayedVariableEvent)
delayedVariableEvent
- the DelayedVariableEvent which should be store on the process instancepublic List<DelayedVariableEvent> getDelayedEvents()
public void clearDelayedEvents()
public void dispatchDelayedEventsAndPerformOperation(PvmAtomicOperation atomicOperation)
atomicOperation
- the atomic operation which should be executedpublic void dispatchDelayedEventsAndPerformOperation(Callback<PvmExecutionImpl,Void> continuation)
continuation
- the atomic operation continuation which should be executedpublic void continueIfExecutionDoesNotAffectNextOperation(Callback<PvmExecutionImpl,Void> dispatching, Callback<PvmExecutionImpl,Void> continuation, PvmExecutionImpl execution)
dispatching
- the callback to dispatch the variable eventscontinuation
- the callback to continue with the next atomic operationexecution
- the execution which is used for the executionprotected void continueExecutionIfNotCanceled(Callback<PvmExecutionImpl,Void> continuation, PvmExecutionImpl execution)
protected void dispatchScopeEvents(PvmExecutionImpl execution)
execution
- the execution on which scope the delayed variable should be dispatchedprotected void initActivityIds(List<DelayedVariableEvent> delayedEvents, Map<PvmExecutionImpl,String> activityInstanceIds, Map<PvmExecutionImpl,String> activityIds)
delayedEvents
- the delayed events which contains the information about the target scopeactivityInstanceIds
- the map which maps target scope to activity instance idactivityIds
- the map which maps target scope to activity idCopyright © 2018. All rights reserved.