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, businessKeyWithoutCascade, eventName, eventSource, id, listenerIndex, skipCustomListeners, skipIoMapping, skipSubprocesses, tenantIdcachedElContext| 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.
|
Incident |
createIncident(String incidentType,
String configuration)
Returns the newest incident in this execution
|
Incident |
createIncident(String incidentType,
String configuration,
String message)
Create an incident associated with this 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,
boolean skipSubprocesses) |
void |
deleteCascade2(String deleteReason) |
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.
|
IncidentHandler |
findIncidentHandler(String incidentType) |
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 |
getBusinessKey()
The business key for the root execution (e.g.
|
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.
|
void |
resolveIncident(String incidentId)
Resolves an incident with given id.
|
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 targetActivityId)
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() |
getBusinessKeyWithoutCascade, getEventName, getEventSource, getId, getListenerIndex, getTenantId, invokeListener, isSkipCustomListeners, isSkipIoMappings, isSkipSubprocesses, performOperation, performOperationSync, setBusinessKey, setEventName, setEventSource, setId, setListenerIndex, setSkipCustomListeners, setSkipIoMappings, setSkipSubprocesseses, setTenantIdcheckJavaSerialization, 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, initializeVariableStore, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersCreate, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersDelete, invokeVariableLifecycleListenersUpdate, invokeVariableLifecycleListenersUpdate, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariableLocalTransient, setVariableLocalTransient, setVariables, setVariablesLocalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforceUpdategetProcessDefinitionId, getProcessInstanceId, getTenantIdgetEventName, getIdgetVariable, 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, setVariablesLocalgetBpmnModelElementInstance, getBpmnModelInstancegetProcessEngineServicesgetVariable, getVariables, hasVariable, setVariableprotected 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 ActivityExecutionpublic abstract PvmExecutionImpl createExecution(boolean initStartContext)
ActivityExecutioncreateExecution in interface ActivityExecutionpublic PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition)
ActivityExecutioncreateSubProcessInstance in interface ActivityExecutionprocessDefinition - The PvmProcessDefinition of the subprocess.public PvmExecutionImpl createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey)
createSubProcessInstance in interface ActivityExecutionprocessDefinition - 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 ActivityExecutionprocessDefinition - 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)
ActivityExecutionCreates a new sub case instance.
This execution will be the super execution of the
created sub case instance.
createSubCaseInstance in interface ActivityExecutioncaseDefinition - The CmmnCaseDefinition of the sub case instance.public abstract CmmnExecution createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey)
ActivityExecutionCreates a new sub case instance.
This execution will be the super execution of the
created sub case instance.
createSubCaseInstance in interface ActivityExecutioncaseDefinition - 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 PvmProcessInstancepublic void start(Map<String,Object> variables)
start in interface PvmProcessInstancepublic void startWithoutExecuting(Map<String,Object> variables)
variables - the variables which are used for the startpublic abstract void fireHistoricProcessStartEvent()
public void destroy()
destroy in interface ActivityExecutionpublic void removeAllTasks()
protected void removeEventScopes()
public void clearScope(String reason, boolean skipCustomListeners, boolean skipIoMappings)
public void interrupt(String reason)
interrupt in interface ActivityExecutionpublic void interrupt(String reason, boolean skipCustomListeners, boolean skipIoMappings)
public void end(boolean completeScope)
end in interface ActivityExecutioncompleteScope - true if ending the execution contributes to completing the BPMN 2.0 scopepublic void endCompensation()
ActivityExecutionendCompensation in interface ActivityExecutionpublic 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 ActivityExecutionpublic PvmExecutionImpl createConcurrentExecution()
public boolean tryPruneLastConcurrentChild()
tryPruneLastConcurrentChild in interface ActivityExecutionpublic void deleteCascade(String deleteReason)
deleteCascade in interface PvmProcessInstancepublic void deleteCascade(String deleteReason, boolean skipCustomListeners)
public void deleteCascade(String deleteReason, boolean skipCustomListeners, boolean skipIoMappings)
public void deleteCascade(String deleteReason, boolean skipCustomListeners, boolean skipIoMappings, boolean externallyTerminated, boolean skipSubprocesses)
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 ActivityExecutionsignal in interface PvmExecutionpublic 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 ActivityExecutionactivity - 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)
ActivityExecutionfindInactiveConcurrentExecutions in interface ActivityExecutionpublic List<ActivityExecution> findInactiveChildExecutions(PvmActivity activity)
findInactiveChildExecutions in interface ActivityExecutionprotected List<PvmExecutionImpl> getAllChildExecutions()
public void leaveActivityViaTransition(PvmTransition outgoingTransition)
leaveActivityViaTransition in interface ActivityExecutionpublic void leaveActivityViaTransitions(List<PvmTransition> _transitions, List<? extends ActivityExecution> _recyclableExecutions)
ActivityExecutionleaveActivityViaTransitions in interface ActivityExecutionprotected abstract void removeVariablesLocalInternal()
public boolean isActive(String activityId)
public void inactivate()
ActivityExecutioninactivate in interface ActivityExecutionpublic abstract List<? extends PvmExecutionImpl> getExecutions()
ActivityExecutiongetExecutions in interface ActivityExecutionpublic abstract List<? extends PvmExecutionImpl> getExecutionsAsCopy()
public List<? extends PvmExecutionImpl> getNonEventScopeExecutions()
ActivityExecutiongetNonEventScopeExecutions in interface ActivityExecutionpublic List<? extends PvmExecutionImpl> getEventScopeExecutions()
public PvmExecutionImpl findExecution(String activityId)
findExecution in interface PvmProcessInstancepublic List<PvmExecution> findExecutions(String activityId)
findExecutions in interface PvmProcessInstanceprotected void collectExecutions(String activityId, List<PvmExecution> executions)
public List<String> findActiveActivityIds()
findActiveActivityIds in interface PvmProcessInstancepublic String getProcessBusinessKey()
DelegateExecutiongetProcessBusinessKey in interface DelegateExecutionpublic String getBusinessKey()
BaseDelegateExecutiongetBusinessKey in interface BaseDelegateExecutionpublic void setProcessDefinition(ProcessDefinitionImpl processDefinition)
public ProcessDefinitionImpl getProcessDefinition()
public abstract PvmExecutionImpl getProcessInstance()
getProcessInstance in interface DelegateExecutionpublic abstract void setProcessInstance(PvmExecutionImpl pvmExecutionImpl)
public String getCaseInstanceId()
public void setCaseInstanceId(String caseInstanceId)
public ActivityImpl getActivity()
getActivity in interface ActivityExecutiongetActivity in interface PvmExecutionpublic String getActivityId()
public String getCurrentActivityName()
DelegateExecutiongetCurrentActivityName in interface DelegateExecutionpublic String getCurrentActivityId()
DelegateExecutiongetCurrentActivityId in interface DelegateExecutionpublic void setActivity(PvmActivity activity)
setActivity in interface ActivityExecutionpublic void enterActivityInstance()
ActivityExecutionenterActivityInstance in interface ActivityExecutionpublic void activityInstanceStarting()
public void activityInstanceStarted()
public void activityInstanceDone()
public void leaveActivityInstance()
ActivityExecutionleaveActivityInstance in interface ActivityExecutionpublic String getParentActivityInstanceId()
ActivityExecutiongetParentActivityInstanceId in interface DelegateExecutiongetParentActivityInstanceId in interface ActivityExecutionpublic void setActivityInstanceId(String activityInstanceId)
setActivityInstanceId in interface ActivityExecutionpublic String getActivityInstanceId()
ActivityExecutiongetActivityInstanceId in interface DelegateExecutiongetActivityInstanceId in interface ActivityExecutionpublic abstract PvmExecutionImpl getParent()
getParent in interface ActivityExecutionpublic String getParentId()
DelegateExecutiongetParentId in interface DelegateExecutionpublic boolean hasChildren()
hasChildren in interface ActivityExecutionpublic void setParent(PvmExecutionImpl parent)
public abstract void setParentExecution(PvmExecutionImpl parent)
public abstract PvmExecutionImpl getSuperExecution()
DelegateExecutiongetSuperExecution in interface DelegateExecutionpublic 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()
ActivityExecutionisScope in interface ActivityExecutionpublic void setScope(boolean isScope)
ActivityExecutionsetScope in interface ActivityExecutionpublic 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 ActivityExecutiontargetFlowScope - 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()
ActivityExecutionActivityExecution.getActivity() is not null).createActivityExecutionMapping in interface ActivityExecutionprotected 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 VariableScopegetVariableScopeKey in class AbstractVariableScopepublic AbstractVariableScope getParentVariableScope()
getParentVariableScope in class AbstractVariableScopepublic void setVariable(String variableName, Object value, String targetActivityId)
setVariable in interface DelegateExecutionvariableName - - name of the variablevalue - - value of the variabletargetActivityId - - 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 ActivityExecutionpublic List<PvmTransition> getTransitionsToTake()
public void setTransitionsToTake(List<PvmTransition> transitionsToTake)
public String getCurrentTransitionId()
DelegateExecutiongetCurrentTransitionId in interface DelegateExecutionpublic void setTransition(PvmTransition transition)
public boolean isConcurrent()
ActivityExecutionisConcurrent in interface ActivityExecutionpublic void setConcurrent(boolean isConcurrent)
ActivityExecutionsetConcurrent in interface ActivityExecutionpublic boolean isActive()
ActivityExecutionisActive in interface ActivityExecutionpublic void setActive(boolean isActive)
ActivityExecutionsetActive in interface ActivityExecutionpublic void setEnded(boolean isEnded)
setEnded in interface ActivityExecutionpublic boolean isEnded()
ActivityExecutionisEnded in interface ActivityExecutionisEnded in interface PvmProcessInstancepublic boolean isCanceled()
DelegateExecutionisCanceled in interface DelegateExecutionpublic void setCanceled(boolean canceled)
public boolean isCompleteScope()
ActivityExecutionisCompleteScope in interface ActivityExecutionpublic 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()
ActivityExecutiongetNextActivity in interface ActivityExecutionpublic boolean isProcessInstanceExecution()
ActivityExecutionisProcessInstanceExecution in interface ActivityExecutionpublic 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 idpublic Incident createIncident(String incidentType, String configuration)
createIncident in interface DelegateExecutionincidentType - the type of new incidentconfiguration - configuration of the incidentpublic Incident createIncident(String incidentType, String configuration, String message)
DelegateExecutioncreateIncident in interface DelegateExecutionincidentType - the type of incidentpublic void resolveIncident(String incidentId)
resolveIncident in interface DelegateExecutionincidentId - public IncidentHandler findIncidentHandler(String incidentType)
Copyright © 2019. All rights reserved.