|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl
public class ExecutionImpl
| Field Summary | |
|---|---|
protected ActivityImpl |
activity
current activity |
protected String |
activityInstanceId
the Id of the current activity instance |
protected int |
activityInstanceState
|
protected String |
businessKey
the business key |
protected String |
deleteReason
|
protected boolean |
deleteRoot
|
protected String |
eventName
|
protected PvmProcessElement |
eventSource
|
protected int |
executionListenerIndex
|
protected List<ExecutionImpl> |
executions
nested executions representing scopes or concurrent paths |
protected boolean |
isActive
indicates if this execution represents an active path of execution. |
protected boolean |
isConcurrent
|
protected boolean |
isEnded
|
protected boolean |
isEventScope
|
protected boolean |
isOperating
|
protected boolean |
isScope
|
protected PvmActivity |
nextActivity
|
protected AtomicOperation |
nextOperation
next operation. |
protected ExecutionImpl |
parent
the parent execution |
protected ProcessDefinitionImpl |
processDefinition
|
protected ExecutionImpl |
processInstance
the process instance. |
protected ProcessInstanceStartContext |
processInstanceStartContext
only available until the process instance is started |
protected ExecutionImpl |
replacedBy
when execution structure is pruned during a takeAll, then the original execution has to be resolved to the replaced execution. |
protected ExecutionImpl |
subProcessInstance
reference to a subprocessinstance, not-null if currently subprocess is started from this execution |
protected ExecutionImpl |
superExecution
super execution, not-null if this execution is part of a subprocess |
protected TransitionImpl |
transition
current transition. |
protected TransitionImpl |
transitionBeingTaken
transition that will be taken. |
protected Map<String,Object> |
variables
|
| Constructor Summary | |
|---|---|
ExecutionImpl()
|
|
ExecutionImpl(ActivityImpl initial)
|
|
| Method Summary | |
|---|---|
protected boolean |
allExecutionsInSameActivity(List<ExecutionImpl> executions)
|
void |
cancelScope(String reason)
Called when a scope is cancelled. |
protected void |
collectActiveActivityIds(List<String> activeActivityIds)
|
protected void |
collectVariables(Map<String,Object> collectedVariables)
|
ExecutionImpl |
createExecution()
creates a new execution. |
PvmProcessInstance |
createSubProcessInstance(PvmProcessDefinition processDefinition)
creates a new sub process instance. |
PvmProcessInstance |
createSubProcessInstance(PvmProcessDefinition processDefinition,
String businessKey)
|
void |
deleteCascade(String deleteReason)
|
void |
deleteCascade2(String deleteReason)
|
void |
deleteVariablesLocal()
|
void |
destroy()
|
void |
disposeProcessInstanceStartContext()
|
void |
end(boolean completeScope)
removes an execution. |
protected void |
ensureActivityInitialized()
must be called before the activity member field or getActivity() is called |
protected void |
ensureExecutionsInitialized()
must be called before memberfield executions is used. |
protected void |
ensureParentInitialized()
must be called before memberfield parent is used. |
protected void |
ensureProcessDefinitionInitialized()
must be called before memberfield processDefinition is used. |
protected void |
ensureProcessInstanceInitialized()
must be called before memberfield processInstance is used. |
protected void |
ensureScopeInitialized()
|
protected void |
ensureSubProcessInstanceInitialized()
|
protected void |
ensureSuperExecutionInitialized()
|
protected void |
ensureVariablesInitialized()
|
void |
enterActivityInstance()
invoked to notify the execution that a new activity instance is started |
void |
executeActivity(PvmActivity activity)
Executes the ActivityBehavior associated with the given activity. |
List<String> |
findActiveActivityIds()
|
ExecutionImpl |
findExecution(String activityId)
searches for an execution positioned in the given activity |
List<ActivityExecution> |
findInactiveConcurrentExecutions(PvmActivity activity)
Retrieves all executions which are concurrent and inactive at the given activity. |
protected String |
generateActivityInstanceId(String activityId)
generates an activity instance id |
ActivityImpl |
getActivity()
ensures initialization and returns the activity |
String |
getActivityInstanceId()
return the Id of the activity instance currently executed by this execution |
String |
getBusinessKey()
The business key for this execution. |
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 |
String |
getDeleteReason()
|
String |
getEventName()
The event name in case this execution is passed in for an ExecutionListener |
PvmProcessElement |
getEventSource()
|
Integer |
getExecutionListenerIndex()
|
List<ExecutionImpl> |
getExecutions()
ensures initialization and returns the non-null executions list |
String |
getId()
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. |
PvmActivity |
getNextActivity()
An activity which is to be started next. |
ExecutionImpl |
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. |
String |
getProcessBusinessKey()
The business key for the process instance this execution is associated with. |
ProcessDefinitionImpl |
getProcessDefinition()
ensures initialization and returns the process definition. |
String |
getProcessDefinitionId()
The process definition key for the process instance this execution is associated with. |
ExecutionImpl |
getProcessInstance()
ensures initialization and returns the process instance. |
String |
getProcessInstanceId()
Reference to the overall process instance |
ProcessInstanceStartContext |
getProcessInstanceStartContext()
|
ExecutionImpl |
getReplacedBy()
|
ExecutionImpl |
getSubProcessInstance()
|
ExecutionImpl |
getSuperExecution()
|
protected String |
getToStringIdentity()
|
TransitionImpl |
getTransition()
|
Object |
getVariable(String variableName)
|
Object |
getVariableLocal(String variableName)
|
Set<String> |
getVariableNames()
|
Set<String> |
getVariableNamesLocal()
|
Map<String,Object> |
getVariables()
|
Map<String,Object> |
getVariablesLocal()
|
protected boolean |
hasConcurrentSiblings(ExecutionImpl concurrentRoot)
|
boolean |
hasVariable(String variableName)
|
boolean |
hasVariableLocal(String variableName)
|
boolean |
hasVariables()
|
boolean |
hasVariablesLocal()
|
void |
inactivate()
Inactivates this execution. |
void |
initialize()
|
void |
interruptScope(String reason)
Called when an execution is interrupted. |
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 |
isProcessInstance()
returns whether this execution is a process instance or not. |
boolean |
isScope()
Returns whether this execution is a scope. |
void |
leaveActivityInstance()
invoked to notify the execution that an activity instance is ended. |
protected ExecutionImpl |
newExecution()
instantiates a new execution. |
void |
performOperation(AtomicOperation executionOperation)
|
void |
performOperationSync(AtomicOperation executionOperation)
|
void |
remove()
|
void |
removeVariable(String variableName)
Removes the variable and creates a new HistoricVariableUpdateEntity. |
void |
removeVariableLocal(String variableName)
Removes the local variable and creates a new HistoricVariableUpdateEntity. |
void |
removeVariables()
Removes the (local) variables and creates a new HistoricVariableUpdateEntity for each of them. |
void |
removeVariables(Collection<String> variableNames)
Removes the variables and creates a new HistoricVariableUpdateEntity for each of them. |
void |
removeVariablesLocal()
Removes the (local) variables and creates a new HistoricVariableUpdateEntity for each of them. |
void |
removeVariablesLocal(Collection<String> variableNames)
Removes the local variables and creates a new HistoricVariableUpdateEntity for each of them. |
void |
replace(InterpretableExecution execution)
|
void |
setActive(boolean isActive)
makes this execution active or inactive. |
void |
setActivity(PvmActivity activity)
sets the current activity. |
void |
setActivityInstanceId(String activityInstanceId)
|
void |
setBusinessKey(String businessKey)
|
void |
setCanceled(boolean canceled)
|
void |
setCompleteScope(boolean completeScope)
|
void |
setConcurrent(boolean isConcurrent)
changes the concurrent indicator on this execution. |
void |
setDeleteReason(String deleteReason)
|
void |
setEventName(String eventName)
|
void |
setEventScope(boolean isEventScope)
|
void |
setEventSource(PvmProcessElement eventSource)
|
void |
setExecutionListenerIndex(Integer executionListenerIndex)
|
void |
setExecutions(List<ExecutionImpl> executions)
|
void |
setParent(InterpretableExecution parent)
all updates need to go through this setter as subclasses can override this method |
void |
setProcessDefinition(ProcessDefinitionImpl processDefinition)
|
void |
setProcessInstance(InterpretableExecution processInstance)
for setting the process instance, this setter must be used as subclasses can override |
void |
setReplacedBy(InterpretableExecution replacedBy)
|
void |
setScope(boolean isScope)
Changes whether this execution is a scope or not |
void |
setSubProcessInstance(InterpretableExecution subProcessInstance)
|
void |
setSuperExecution(ExecutionImpl superExecution)
|
void |
setTransition(TransitionImpl transition)
|
void |
setTransitionBeingTaken(TransitionImpl transitionBeingTaken)
|
void |
setVariable(String variableName,
Object value)
|
void |
setVariableLocal(String variableName,
Object value)
|
void |
setVariableLocally(String variableName,
Object value)
|
void |
setVariables(Map<String,? extends Object> variables)
|
void |
setVariablesLocal(Map<String,? extends Object> variables)
|
void |
signal(String signalName,
Object signalData)
|
void |
start()
|
void |
start(Map<String,Object> variables)
|
void |
start(String businessKey)
|
void |
start(String businessKey,
Map<String,Object> variables)
|
void |
take(PvmTransition transition)
leaves the current activity by taking the given transition. |
void |
takeAll(List<PvmTransition> transitions,
List<ActivityExecution> recyclableExecutions)
Takes the given outgoing transitions, and potentially reusing the given list of executions that were previously joined. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ProcessDefinitionImpl processDefinition
protected ActivityImpl activity
protected PvmActivity nextActivity
protected String activityInstanceId
protected TransitionImpl transition
protected TransitionImpl transitionBeingTaken
protected ExecutionImpl processInstance
protected ExecutionImpl parent
protected List<ExecutionImpl> executions
protected ExecutionImpl superExecution
protected ExecutionImpl subProcessInstance
protected ProcessInstanceStartContext processInstanceStartContext
protected String businessKey
protected boolean isActive
protected boolean isScope
protected boolean isConcurrent
protected boolean isEnded
protected boolean isEventScope
protected int activityInstanceState
protected Map<String,Object> variables
protected String eventName
protected PvmProcessElement eventSource
protected int executionListenerIndex
protected boolean deleteRoot
protected String deleteReason
protected ExecutionImpl replacedBy
#takeAll(List, List)} {@link OutgoingExecution}protected AtomicOperation nextOperation
AtomicOperation,
performOperation(AtomicOperation)protected boolean isOperating
| Constructor Detail |
|---|
public ExecutionImpl()
public ExecutionImpl(ActivityImpl initial)
| Method Detail |
|---|
public ExecutionImpl createExecution()
createExecution in interface ActivityExecutionprotected ExecutionImpl newExecution()
public PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition)
ActivityExecution
createSubProcessInstance in interface ActivityExecutionprocessDefinition - The PvmProcessDefinition of the subprocess.
public PvmProcessInstance 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 void initialize()
initialize in interface InterpretableExecutionpublic void destroy()
destroy in interface InterpretableExecutionpublic void remove()
remove in interface InterpretableExecutionpublic void cancelScope(String reason)
InterpretableExecution
cancelScope in interface InterpretableExecutionpublic void interruptScope(String reason)
ActivityExecution
interruptScope in interface ActivityExecutionpublic ExecutionImpl getParent()
getParent in interface ActivityExecutiongetParent in interface InterpretableExecutionpublic String getParentId()
DelegateExecution
getParentId in interface DelegateExecutionpublic void setParent(InterpretableExecution parent)
setParent in interface InterpretableExecutionprotected void ensureParentInitialized()
public List<ExecutionImpl> getExecutions()
getExecutions in interface ActivityExecutionpublic ExecutionImpl getSuperExecution()
getSuperExecution in interface InterpretableExecutionpublic void setSuperExecution(ExecutionImpl superExecution)
protected void ensureSuperExecutionInitialized()
public ExecutionImpl getSubProcessInstance()
getSubProcessInstance in interface InterpretableExecutionpublic void setSubProcessInstance(InterpretableExecution subProcessInstance)
setSubProcessInstance in interface InterpretableExecutionprotected void ensureSubProcessInstanceInitialized()
public void deleteCascade(String deleteReason)
deleteCascade in interface PvmProcessInstancepublic void deleteCascade2(String deleteReason)
deleteCascade2 in interface InterpretableExecutionpublic void end(boolean completeScope)
end in interface ActivityExecutionpublic ExecutionImpl findExecution(String activityId)
findExecution in interface PvmProcessInstancepublic List<String> findActiveActivityIds()
findActiveActivityIds in interface PvmProcessInstanceprotected void collectActiveActivityIds(List<String> activeActivityIds)
protected void ensureExecutionsInitialized()
public ProcessDefinitionImpl getProcessDefinition()
getProcessDefinition in interface InterpretableExecutionpublic String getProcessDefinitionId()
DelegateExecution
getProcessDefinitionId in interface DelegateExecutionprotected void ensureProcessDefinitionInitialized()
public ExecutionImpl getProcessInstance()
public String getProcessInstanceId()
DelegateExecution
getProcessInstanceId in interface DelegateExecutionpublic String getBusinessKey()
DelegateExecution
getBusinessKey in interface DelegateExecutionpublic void setBusinessKey(String businessKey)
public String getProcessBusinessKey()
DelegateExecution
getProcessBusinessKey in interface DelegateExecutionpublic void setProcessInstance(InterpretableExecution processInstance)
setProcessInstance in interface InterpretableExecutionprotected void ensureProcessInstanceInitialized()
public ActivityImpl getActivity()
getActivity in interface ActivityExecutiongetActivity in interface PvmExecutionpublic void setActivity(PvmActivity activity)
setActivity in interface InterpretableExecutionprotected void ensureActivityInitialized()
public void enterActivityInstance()
ActivityExecution
enterActivityInstance in interface ActivityExecutionpublic void leaveActivityInstance()
ActivityExecution
leaveActivityInstance in interface ActivityExecutionpublic String getParentActivityInstanceId()
ActivityExecution
getParentActivityInstanceId in interface DelegateExecutiongetParentActivityInstanceId in interface ActivityExecutionprotected String generateActivityInstanceId(String activityId)
protected void ensureScopeInitialized()
public boolean isScope()
ActivityExecution
isScope in interface ActivityExecutionpublic void setScope(boolean isScope)
ActivityExecution
setScope in interface ActivityExecutionpublic void start()
start in interface PvmProcessInstancepublic void start(Map<String,Object> variables)
start in interface PvmProcessInstancepublic void start(String businessKey)
start in interface PvmProcessInstance
public void start(String businessKey,
Map<String,Object> variables)
start in interface PvmProcessInstance
public void signal(String signalName,
Object signalData)
signal in interface PvmExecutionpublic void take(PvmTransition transition)
ActivityExecution
take in interface ActivityExecutionpublic void executeActivity(PvmActivity activity)
ActivityExecutionActivityBehavior associated with the given activity.
executeActivity in interface ActivityExecutionpublic List<ActivityExecution> findInactiveConcurrentExecutions(PvmActivity activity)
ActivityExecution
findInactiveConcurrentExecutions in interface ActivityExecution
public void takeAll(List<PvmTransition> transitions,
List<ActivityExecution> recyclableExecutions)
ActivityExecution
takeAll in interface ActivityExecutionprotected boolean allExecutionsInSameActivity(List<ExecutionImpl> executions)
public void performOperation(AtomicOperation executionOperation)
performOperation in interface InterpretableExecutionpublic void performOperationSync(AtomicOperation executionOperation)
performOperationSync in interface InterpretableExecutionprotected boolean hasConcurrentSiblings(ExecutionImpl concurrentRoot)
public boolean isActive(String activityId)
public Object getVariable(String variableName)
getVariable in interface VariableScopegetVariable in interface PvmExecutionpublic Map<String,Object> getVariables()
getVariables in interface VariableScopegetVariables in interface PvmExecutionprotected void collectVariables(Map<String,Object> collectedVariables)
public void setVariables(Map<String,? extends Object> variables)
setVariables in interface VariableScope
public void setVariable(String variableName,
Object value)
setVariable in interface VariableScopesetVariable in interface PvmExecution
public void setVariableLocally(String variableName,
Object value)
public boolean hasVariable(String variableName)
hasVariable in interface VariableScopehasVariable in interface PvmExecutionprotected void ensureVariablesInitialized()
public String toString()
toString in class Objectprotected String getToStringIdentity()
public boolean isProcessInstance()
ActivityExecution
isProcessInstance in interface ActivityExecutionpublic void inactivate()
ActivityExecution
inactivate in interface ActivityExecutionpublic String getId()
DelegateExecution
getId in interface DelegateExecutionpublic TransitionImpl getTransition()
getTransition in interface InterpretableExecutionpublic void setTransition(TransitionImpl transition)
setTransition in interface InterpretableExecutionpublic Integer getExecutionListenerIndex()
getExecutionListenerIndex in interface InterpretableExecutionpublic void setExecutionListenerIndex(Integer executionListenerIndex)
setExecutionListenerIndex in interface InterpretableExecutionpublic boolean isConcurrent()
ActivityExecution
isConcurrent in interface ActivityExecutionpublic void setConcurrent(boolean isConcurrent)
ActivityExecution
setConcurrent in interface ActivityExecutionpublic boolean isActive()
ActivityExecution
isActive in interface ActivityExecutionpublic void setActive(boolean isActive)
ActivityExecution
setActive in interface ActivityExecutionpublic boolean isEnded()
ActivityExecution
isEnded in interface ActivityExecutionisEnded in interface PvmProcessInstancepublic boolean isCanceled()
ActivityExecution
isCanceled in interface ActivityExecutionpublic void setCanceled(boolean canceled)
setCanceled in interface InterpretableExecutionpublic boolean isCompleteScope()
ActivityExecution
isCompleteScope in interface ActivityExecutionpublic void setCompleteScope(boolean completeScope)
setCompleteScope in interface InterpretableExecutionpublic void setProcessDefinition(ProcessDefinitionImpl processDefinition)
setProcessDefinition in interface InterpretableExecutionpublic String getEventName()
DelegateExecutionevent name in case this execution is passed in for an ExecutionListener
getEventName in interface DelegateExecutiongetEventName in interface ExecutionListenerExecutionpublic void setEventName(String eventName)
setEventName in interface InterpretableExecutionpublic PvmProcessElement getEventSource()
getEventSource in interface ExecutionListenerExecutionpublic void setEventSource(PvmProcessElement eventSource)
setEventSource in interface InterpretableExecutionpublic String getDeleteReason()
getDeleteReason in interface ExecutionListenerExecutionpublic void setDeleteReason(String deleteReason)
public ExecutionImpl getReplacedBy()
getReplacedBy in interface InterpretableExecutionpublic void setReplacedBy(InterpretableExecution replacedBy)
setReplacedBy in interface InterpretableExecutionpublic void replace(InterpretableExecution execution)
replace in interface InterpretableExecutionpublic void setExecutions(List<ExecutionImpl> executions)
public boolean isDeleteRoot()
isDeleteRoot in interface InterpretableExecutionpublic String getCurrentActivityId()
DelegateExecution
getCurrentActivityId in interface DelegateExecutionpublic String getCurrentActivityName()
DelegateExecution
getCurrentActivityName in interface DelegateExecutionpublic Object getVariableLocal(String variableName)
getVariableLocal in interface VariableScopepublic Set<String> getVariableNames()
getVariableNames in interface VariableScopepublic Set<String> getVariableNamesLocal()
getVariableNamesLocal in interface VariableScopepublic Map<String,Object> getVariablesLocal()
getVariablesLocal in interface VariableScopepublic boolean hasVariableLocal(String variableName)
hasVariableLocal in interface VariableScopepublic boolean hasVariables()
hasVariables in interface VariableScopepublic boolean hasVariablesLocal()
hasVariablesLocal in interface VariableScopepublic void removeVariable(String variableName)
VariableScopeHistoricVariableUpdateEntity.
removeVariable in interface VariableScopepublic void removeVariableLocal(String variableName)
VariableScopeHistoricVariableUpdateEntity.
removeVariableLocal in interface VariableScopepublic void removeVariables(Collection<String> variableNames)
VariableScopeHistoricVariableUpdateEntity for each of them.
removeVariables in interface VariableScopepublic void removeVariablesLocal(Collection<String> variableNames)
VariableScopeHistoricVariableUpdateEntity for each of them.
removeVariablesLocal in interface VariableScopepublic void removeVariables()
VariableScopeHistoricVariableUpdateEntity for each of them.
removeVariables in interface VariableScopepublic void removeVariablesLocal()
VariableScopeHistoricVariableUpdateEntity for each of them.
removeVariablesLocal in interface VariableScopepublic void deleteVariablesLocal()
public void setVariableLocal(String variableName,
Object value)
setVariableLocal in interface VariableScopepublic void setVariablesLocal(Map<String,? extends Object> variables)
setVariablesLocal in interface VariableScopepublic boolean isEventScope()
isEventScope in interface InterpretableExecutionpublic void setEventScope(boolean isEventScope)
setEventScope in interface InterpretableExecutionpublic ProcessInstanceStartContext getProcessInstanceStartContext()
getProcessInstanceStartContext in interface InterpretableExecutionpublic void disposeProcessInstanceStartContext()
disposeProcessInstanceStartContext in interface InterpretableExecutionpublic String getActivityInstanceId()
ActivityExecution
getActivityInstanceId in interface DelegateExecutiongetActivityInstanceId in interface ActivityExecutionpublic void setActivityInstanceId(String activityInstanceId)
setActivityInstanceId in interface ActivityExecutionpublic PvmActivity getNextActivity()
ActivityExecution
getNextActivity in interface ActivityExecutionpublic void setTransitionBeingTaken(TransitionImpl transitionBeingTaken)
public String getCurrentTransitionId()
DelegateExecution
getCurrentTransitionId in interface DelegateExecution
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||