org.camunda.bpm.engine.impl.pvm.runtime
Class ExecutionImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl
All Implemented Interfaces:
Serializable, BpmnModelExecutionContext, DelegateExecution, ProcessEngineServicesAware, VariableScope, ActivityExecution, ExecutionListenerExecution, PvmExecution, PvmProcessInstance, InterpretableExecution

public class ExecutionImpl
extends Object
implements Serializable, ActivityExecution, ExecutionListenerExecution, PvmExecution, InterpretableExecution

Author:
Tom Baeyens, Joram Barrez, Daniel Meyer, Falko Menge
See Also:
Serialized Form

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  ExecutionStartContext executionStartContext
          only available until the execution is started
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.
 ExecutionImpl createExecution(boolean initializeExecutionStartContext)
          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 disposeExecutionStartContext()
           
 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
 org.camunda.bpm.model.bpmn.instance.FlowElement getBpmnModelElementInstance()
          Returns the currently executed Element in the BPMN Model.
 org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance()
          Returns the BpmnModelInstance for the currently executed Bpmn Model
 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
 ExecutionStartContext getExecutionStartContext()
           
 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.
 ProcessEngineServices getProcessEngineServices()
          Returns the ProcessEngineServices providing access to the public API of the process engine.
 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

processDefinition

protected ProcessDefinitionImpl processDefinition

activity

protected ActivityImpl activity
current activity


nextActivity

protected PvmActivity nextActivity

activityInstanceId

protected String activityInstanceId
the Id of the current activity instance


transition

protected TransitionImpl transition
current transition. is null when there is no transition being taken.


transitionBeingTaken

protected TransitionImpl transitionBeingTaken
transition that will be taken. is null when there is no transition being taken.


processInstance

protected ExecutionImpl processInstance
the process instance. this is the root of the execution tree. the processInstance of a process instance is a self reference.


parent

protected ExecutionImpl parent
the parent execution


executions

protected List<ExecutionImpl> executions
nested executions representing scopes or concurrent paths


superExecution

protected ExecutionImpl superExecution
super execution, not-null if this execution is part of a subprocess


subProcessInstance

protected ExecutionImpl subProcessInstance
reference to a subprocessinstance, not-null if currently subprocess is started from this execution


processInstanceStartContext

protected ProcessInstanceStartContext processInstanceStartContext
only available until the process instance is started


executionStartContext

protected ExecutionStartContext executionStartContext
only available until the execution is started


businessKey

protected String businessKey
the business key


isActive

protected boolean isActive
indicates if this execution represents an active path of execution. Executions are made inactive in the following situations:


isScope

protected boolean isScope

isConcurrent

protected boolean isConcurrent

isEnded

protected boolean isEnded

isEventScope

protected boolean isEventScope

activityInstanceState

protected int activityInstanceState

variables

protected Map<String,Object> variables

eventName

protected String eventName

eventSource

protected PvmProcessElement eventSource

executionListenerIndex

protected int executionListenerIndex

deleteRoot

protected boolean deleteRoot

deleteReason

protected String deleteReason

replacedBy

protected ExecutionImpl replacedBy
when execution structure is pruned during a takeAll, then the original execution has to be resolved to the replaced execution.

See Also:
#takeAll(List, List)} {@link OutgoingExecution}

nextOperation

protected AtomicOperation nextOperation
next operation. process execution is in fact runtime interpretation of the process model. each operation is a logical unit of interpretation of the process. so sequentially processing the operations drives the interpretation or execution of a process.

See Also:
AtomicOperation, performOperation(AtomicOperation)

isOperating

protected boolean isOperating
Constructor Detail

ExecutionImpl

public ExecutionImpl()

ExecutionImpl

public ExecutionImpl(ActivityImpl initial)
Method Detail

createExecution

public ExecutionImpl createExecution()
creates a new execution. properties processDefinition, processInstance and activity will be initialized.

Specified by:
createExecution in interface ActivityExecution

createExecution

public ExecutionImpl createExecution(boolean initializeExecutionStartContext)
creates a new execution. properties processDefinition, processInstance and activity will be initialized.

Specified by:
createExecution in interface ActivityExecution

newExecution

protected ExecutionImpl newExecution()
instantiates a new execution. can be overridden by subclasses


createSubProcessInstance

public PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition)
Description copied from interface: ActivityExecution
creates a new sub process instance. The current execution will be the super execution of the created execution.

Specified by:
createSubProcessInstance in interface ActivityExecution
Parameters:
processDefinition - The PvmProcessDefinition of the subprocess.

createSubProcessInstance

public PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition,
                                                   String businessKey)
Specified by:
createSubProcessInstance in interface ActivityExecution
Parameters:
processDefinition - The PvmProcessDefinition of the subprocess.
businessKey - the business key of the process instance
See Also:
ActivityExecution.createSubProcessInstance(PvmProcessDefinition)

initialize

public void initialize()
Specified by:
initialize in interface InterpretableExecution

destroy

public void destroy()
Specified by:
destroy in interface InterpretableExecution

remove

public void remove()
Specified by:
remove in interface InterpretableExecution

cancelScope

public void cancelScope(String reason)
Description copied from interface: InterpretableExecution
Called when a scope is cancelled. (see AtomicOperationCancelScope ) Performs interrupting scope behavior: all child executions and sub-process instances are removed. The execution itself can continue execution.

Specified by:
cancelScope in interface InterpretableExecution

interruptScope

public void interruptScope(String reason)
Description copied from interface: ActivityExecution
Called when an execution is interrupted. This will remove all associated entities such as event subscriptions, jobs, ...

Specified by:
interruptScope in interface ActivityExecution

getParent

public ExecutionImpl getParent()
ensures initialization and returns the parent

Specified by:
getParent in interface ActivityExecution
Specified by:
getParent in interface InterpretableExecution

getParentId

public String getParentId()
Description copied from interface: DelegateExecution
Gets the id of the parent of this execution. If null, the execution represents a process-instance.

Specified by:
getParentId in interface DelegateExecution

setParent

public void setParent(InterpretableExecution parent)
all updates need to go through this setter as subclasses can override this method

Specified by:
setParent in interface InterpretableExecution

ensureParentInitialized

protected void ensureParentInitialized()
must be called before memberfield parent is used. can be used by subclasses to provide parent member field initialization.


getExecutions

public List<ExecutionImpl> getExecutions()
ensures initialization and returns the non-null executions list

Specified by:
getExecutions in interface ActivityExecution

getSuperExecution

public ExecutionImpl getSuperExecution()
Specified by:
getSuperExecution in interface InterpretableExecution

setSuperExecution

public void setSuperExecution(ExecutionImpl superExecution)

ensureSuperExecutionInitialized

protected void ensureSuperExecutionInitialized()

getSubProcessInstance

public ExecutionImpl getSubProcessInstance()
Specified by:
getSubProcessInstance in interface InterpretableExecution

setSubProcessInstance

public void setSubProcessInstance(InterpretableExecution subProcessInstance)
Specified by:
setSubProcessInstance in interface InterpretableExecution

ensureSubProcessInstanceInitialized

protected void ensureSubProcessInstanceInitialized()

deleteCascade

public void deleteCascade(String deleteReason)
Specified by:
deleteCascade in interface PvmProcessInstance

deleteCascade2

public void deleteCascade2(String deleteReason)
Specified by:
deleteCascade2 in interface InterpretableExecution

end

public void end(boolean completeScope)
removes an execution. if there are nested executions, those will be ended recursively. if there is a parent, this method removes the bidirectional relation between parent and this execution.

Specified by:
end in interface ActivityExecution

findExecution

public ExecutionImpl findExecution(String activityId)
searches for an execution positioned in the given activity

Specified by:
findExecution in interface PvmProcessInstance

findActiveActivityIds

public List<String> findActiveActivityIds()
Specified by:
findActiveActivityIds in interface PvmProcessInstance

collectActiveActivityIds

protected void collectActiveActivityIds(List<String> activeActivityIds)

ensureExecutionsInitialized

protected void ensureExecutionsInitialized()
must be called before memberfield executions is used. can be used by subclasses to provide executions member field initialization.


getProcessDefinition

public ProcessDefinitionImpl getProcessDefinition()
ensures initialization and returns the process definition.

Specified by:
getProcessDefinition in interface InterpretableExecution

getProcessDefinitionId

public String getProcessDefinitionId()
Description copied from interface: DelegateExecution
The process definition key for the process instance this execution is associated with.

Specified by:
getProcessDefinitionId in interface DelegateExecution

ensureProcessDefinitionInitialized

protected void ensureProcessDefinitionInitialized()
must be called before memberfield processDefinition is used. can be used by subclasses to provide processDefinition member field initialization.


getProcessInstance

public ExecutionImpl getProcessInstance()
ensures initialization and returns the process instance.


getProcessInstanceId

public String getProcessInstanceId()
Description copied from interface: DelegateExecution
Reference to the overall process instance

Specified by:
getProcessInstanceId in interface DelegateExecution

getBusinessKey

public String getBusinessKey()
Description copied from interface: DelegateExecution
The business key for this execution. Only returns a value if the delegate execution is a process instance.

Specified by:
getBusinessKey in interface DelegateExecution

setBusinessKey

public void setBusinessKey(String businessKey)

getProcessBusinessKey

public String getProcessBusinessKey()
Description copied from interface: DelegateExecution
The business key for the process instance this execution is associated with.

Specified by:
getProcessBusinessKey in interface DelegateExecution

setProcessInstance

public void setProcessInstance(InterpretableExecution processInstance)
for setting the process instance, this setter must be used as subclasses can override

Specified by:
setProcessInstance in interface InterpretableExecution

ensureProcessInstanceInitialized

protected void ensureProcessInstanceInitialized()
must be called before memberfield processInstance is used. can be used by subclasses to provide processInstance member field initialization.


getActivity

public ActivityImpl getActivity()
ensures initialization and returns the activity

Specified by:
getActivity in interface ActivityExecution
Specified by:
getActivity in interface PvmExecution

setActivity

public void setActivity(PvmActivity activity)
sets the current activity. can be overridden by subclasses. doesn't require initialization.

Specified by:
setActivity in interface InterpretableExecution

ensureActivityInitialized

protected void ensureActivityInitialized()
must be called before the activity member field or getActivity() is called


enterActivityInstance

public void enterActivityInstance()
Description copied from interface: ActivityExecution
invoked to notify the execution that a new activity instance is started

Specified by:
enterActivityInstance in interface ActivityExecution

leaveActivityInstance

public void leaveActivityInstance()
Description copied from interface: ActivityExecution
invoked to notify the execution that an activity instance is ended.

Specified by:
leaveActivityInstance in interface ActivityExecution

getParentActivityInstanceId

public String getParentActivityInstanceId()
Description copied from interface: ActivityExecution
return the Id of the parent activity instance currently executed by this execution

Specified by:
getParentActivityInstanceId in interface DelegateExecution
Specified by:
getParentActivityInstanceId in interface ActivityExecution

generateActivityInstanceId

protected String generateActivityInstanceId(String activityId)
generates an activity instance id


ensureScopeInitialized

protected void ensureScopeInitialized()

isScope

public boolean isScope()
Description copied from interface: ActivityExecution
Returns whether this execution is a scope.

Specified by:
isScope in interface ActivityExecution

setScope

public void setScope(boolean isScope)
Description copied from interface: ActivityExecution
Changes whether this execution is a scope or not

Specified by:
setScope in interface ActivityExecution

start

public void start()
Specified by:
start in interface PvmProcessInstance

start

public void start(Map<String,Object> variables)
Specified by:
start in interface PvmProcessInstance

start

public void start(String businessKey)
Specified by:
start in interface PvmProcessInstance

start

public void start(String businessKey,
                  Map<String,Object> variables)
Specified by:
start in interface PvmProcessInstance

signal

public void signal(String signalName,
                   Object signalData)
Specified by:
signal in interface PvmExecution

take

public void take(PvmTransition transition)
Description copied from interface: ActivityExecution
leaves the current activity by taking the given transition.

Specified by:
take in interface ActivityExecution

executeActivity

public void executeActivity(PvmActivity activity)
Description copied from interface: ActivityExecution
Executes the ActivityBehavior associated with the given activity.

Specified by:
executeActivity in interface ActivityExecution

findInactiveConcurrentExecutions

public List<ActivityExecution> findInactiveConcurrentExecutions(PvmActivity activity)
Description copied from interface: ActivityExecution
Retrieves all executions which are concurrent and inactive at the given activity.

Specified by:
findInactiveConcurrentExecutions in interface ActivityExecution

takeAll

public void takeAll(List<PvmTransition> transitions,
                    List<ActivityExecution> recyclableExecutions)
Description copied from interface: ActivityExecution
Takes the given outgoing transitions, and potentially reusing the given list of executions that were previously joined.

Specified by:
takeAll in interface ActivityExecution

allExecutionsInSameActivity

protected boolean allExecutionsInSameActivity(List<ExecutionImpl> executions)

performOperation

public void performOperation(AtomicOperation executionOperation)
Specified by:
performOperation in interface InterpretableExecution

performOperationSync

public void performOperationSync(AtomicOperation executionOperation)
Specified by:
performOperationSync in interface InterpretableExecution

hasConcurrentSiblings

protected boolean hasConcurrentSiblings(ExecutionImpl concurrentRoot)

isActive

public boolean isActive(String activityId)

getVariable

public Object getVariable(String variableName)
Specified by:
getVariable in interface VariableScope
Specified by:
getVariable in interface PvmExecution

getVariables

public Map<String,Object> getVariables()
Specified by:
getVariables in interface VariableScope
Specified by:
getVariables in interface PvmExecution

collectVariables

protected void collectVariables(Map<String,Object> collectedVariables)

setVariables

public void setVariables(Map<String,? extends Object> variables)
Specified by:
setVariables in interface VariableScope

setVariable

public void setVariable(String variableName,
                        Object value)
Specified by:
setVariable in interface VariableScope
Specified by:
setVariable in interface PvmExecution

setVariableLocally

public void setVariableLocally(String variableName,
                               Object value)

hasVariable

public boolean hasVariable(String variableName)
Specified by:
hasVariable in interface VariableScope
Specified by:
hasVariable in interface PvmExecution

ensureVariablesInitialized

protected void ensureVariablesInitialized()

toString

public String toString()
Overrides:
toString in class Object

getToStringIdentity

protected String getToStringIdentity()

isProcessInstance

public boolean isProcessInstance()
Description copied from interface: ActivityExecution
returns whether this execution is a process instance or not.

Specified by:
isProcessInstance in interface ActivityExecution

inactivate

public void inactivate()
Description copied from interface: ActivityExecution
Inactivates this execution. This is useful for example in a join: the execution still exists, but it is not longer active.

Specified by:
inactivate in interface ActivityExecution

getId

public String getId()
Description copied from interface: DelegateExecution
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.

Specified by:
getId in interface DelegateExecution

getTransition

public TransitionImpl getTransition()
Specified by:
getTransition in interface InterpretableExecution

setTransition

public void setTransition(TransitionImpl transition)
Specified by:
setTransition in interface InterpretableExecution

getExecutionListenerIndex

public Integer getExecutionListenerIndex()
Specified by:
getExecutionListenerIndex in interface InterpretableExecution

setExecutionListenerIndex

public void setExecutionListenerIndex(Integer executionListenerIndex)
Specified by:
setExecutionListenerIndex in interface InterpretableExecution

isConcurrent

public boolean isConcurrent()
Description copied from interface: ActivityExecution
returns whether this execution is concurrent or not.

Specified by:
isConcurrent in interface ActivityExecution

setConcurrent

public void setConcurrent(boolean isConcurrent)
Description copied from interface: ActivityExecution
changes the concurrent indicator on this execution.

Specified by:
setConcurrent in interface ActivityExecution

isActive

public boolean isActive()
Description copied from interface: ActivityExecution
returns whether this execution is currently active.

Specified by:
isActive in interface ActivityExecution

setActive

public void setActive(boolean isActive)
Description copied from interface: ActivityExecution
makes this execution active or inactive.

Specified by:
setActive in interface ActivityExecution

isEnded

public boolean isEnded()
Description copied from interface: ActivityExecution
returns whether this execution has ended or not.

Specified by:
isEnded in interface ActivityExecution
Specified by:
isEnded in interface PvmProcessInstance

isCanceled

public boolean isCanceled()
Description copied from interface: ActivityExecution
Returns whether this execution has been canceled.

Specified by:
isCanceled in interface ActivityExecution

setCanceled

public void setCanceled(boolean canceled)
Specified by:
setCanceled in interface InterpretableExecution

isCompleteScope

public boolean isCompleteScope()
Description copied from interface: ActivityExecution
Returns whether this execution completed the parent scope.

Specified by:
isCompleteScope in interface ActivityExecution

setCompleteScope

public void setCompleteScope(boolean completeScope)
Specified by:
setCompleteScope in interface InterpretableExecution

setProcessDefinition

public void setProcessDefinition(ProcessDefinitionImpl processDefinition)
Specified by:
setProcessDefinition in interface InterpretableExecution

getEventName

public String getEventName()
Description copied from interface: DelegateExecution
The event name in case this execution is passed in for an ExecutionListener

Specified by:
getEventName in interface DelegateExecution
Specified by:
getEventName in interface ExecutionListenerExecution

setEventName

public void setEventName(String eventName)
Specified by:
setEventName in interface InterpretableExecution

getEventSource

public PvmProcessElement getEventSource()
Specified by:
getEventSource in interface ExecutionListenerExecution

setEventSource

public void setEventSource(PvmProcessElement eventSource)
Specified by:
setEventSource in interface InterpretableExecution

getDeleteReason

public String getDeleteReason()
Specified by:
getDeleteReason in interface ExecutionListenerExecution

setDeleteReason

public void setDeleteReason(String deleteReason)

getReplacedBy

public ExecutionImpl getReplacedBy()
Specified by:
getReplacedBy in interface InterpretableExecution

setReplacedBy

public void setReplacedBy(InterpretableExecution replacedBy)
Specified by:
setReplacedBy in interface InterpretableExecution

replace

public void replace(InterpretableExecution execution)
Specified by:
replace in interface InterpretableExecution

setExecutions

public void setExecutions(List<ExecutionImpl> executions)

isDeleteRoot

public boolean isDeleteRoot()
Specified by:
isDeleteRoot in interface InterpretableExecution

getCurrentActivityId

public String getCurrentActivityId()
Description copied from interface: DelegateExecution
Gets the id of the current activity.

Specified by:
getCurrentActivityId in interface DelegateExecution

getCurrentActivityName

public String getCurrentActivityName()
Description copied from interface: DelegateExecution
Gets the name of the current activity.

Specified by:
getCurrentActivityName in interface DelegateExecution

getVariableLocal

public Object getVariableLocal(String variableName)
Specified by:
getVariableLocal in interface VariableScope

getVariableNames

public Set<String> getVariableNames()
Specified by:
getVariableNames in interface VariableScope

getVariableNamesLocal

public Set<String> getVariableNamesLocal()
Specified by:
getVariableNamesLocal in interface VariableScope

getVariablesLocal

public Map<String,Object> getVariablesLocal()
Specified by:
getVariablesLocal in interface VariableScope

hasVariableLocal

public boolean hasVariableLocal(String variableName)
Specified by:
hasVariableLocal in interface VariableScope

hasVariables

public boolean hasVariables()
Specified by:
hasVariables in interface VariableScope

hasVariablesLocal

public boolean hasVariablesLocal()
Specified by:
hasVariablesLocal in interface VariableScope

removeVariable

public void removeVariable(String variableName)
Description copied from interface: VariableScope
Removes the variable and creates a new HistoricVariableUpdateEntity.

Specified by:
removeVariable in interface VariableScope

removeVariableLocal

public void removeVariableLocal(String variableName)
Description copied from interface: VariableScope
Removes the local variable and creates a new HistoricVariableUpdateEntity.

Specified by:
removeVariableLocal in interface VariableScope

removeVariables

public void removeVariables(Collection<String> variableNames)
Description copied from interface: VariableScope
Removes the variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariables in interface VariableScope

removeVariablesLocal

public void removeVariablesLocal(Collection<String> variableNames)
Description copied from interface: VariableScope
Removes the local variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariablesLocal in interface VariableScope

removeVariables

public void removeVariables()
Description copied from interface: VariableScope
Removes the (local) variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariables in interface VariableScope

removeVariablesLocal

public void removeVariablesLocal()
Description copied from interface: VariableScope
Removes the (local) variables and creates a new HistoricVariableUpdateEntity for each of them.

Specified by:
removeVariablesLocal in interface VariableScope

deleteVariablesLocal

public void deleteVariablesLocal()

setVariableLocal

public void setVariableLocal(String variableName,
                             Object value)
Specified by:
setVariableLocal in interface VariableScope

setVariablesLocal

public void setVariablesLocal(Map<String,? extends Object> variables)
Specified by:
setVariablesLocal in interface VariableScope

isEventScope

public boolean isEventScope()
Specified by:
isEventScope in interface InterpretableExecution

setEventScope

public void setEventScope(boolean isEventScope)
Specified by:
setEventScope in interface InterpretableExecution

getProcessInstanceStartContext

public ProcessInstanceStartContext getProcessInstanceStartContext()
Specified by:
getProcessInstanceStartContext in interface InterpretableExecution

getExecutionStartContext

public ExecutionStartContext getExecutionStartContext()
Specified by:
getExecutionStartContext in interface InterpretableExecution

disposeProcessInstanceStartContext

public void disposeProcessInstanceStartContext()
Specified by:
disposeProcessInstanceStartContext in interface InterpretableExecution

disposeExecutionStartContext

public void disposeExecutionStartContext()
Specified by:
disposeExecutionStartContext in interface InterpretableExecution

getActivityInstanceId

public String getActivityInstanceId()
Description copied from interface: ActivityExecution
return the Id of the activity instance currently executed by this execution

Specified by:
getActivityInstanceId in interface DelegateExecution
Specified by:
getActivityInstanceId in interface ActivityExecution

setActivityInstanceId

public void setActivityInstanceId(String activityInstanceId)
Specified by:
setActivityInstanceId in interface ActivityExecution

getNextActivity

public PvmActivity getNextActivity()
Description copied from interface: ActivityExecution
An activity which is to be started next.

Specified by:
getNextActivity in interface ActivityExecution

setTransitionBeingTaken

public void setTransitionBeingTaken(TransitionImpl transitionBeingTaken)

getCurrentTransitionId

public String getCurrentTransitionId()
Description copied from interface: DelegateExecution
return the Id of the current transition

Specified by:
getCurrentTransitionId in interface DelegateExecution

getBpmnModelElementInstance

public org.camunda.bpm.model.bpmn.instance.FlowElement getBpmnModelElementInstance()
Description copied from interface: BpmnModelExecutionContext

Returns the currently executed Element in the BPMN Model. This method returns a FlowElement which may be casted to the concrete type of the Bpmn Model Element currently executed.

If called from a Service ExecutionListener, the method will return the corresponding FlowNode for ExecutionListener.EVENTNAME_START and ExecutionListener.EVENTNAME_END and the corresponding SequenceFlow for ExecutionListener.EVENTNAME_TAKE.

Specified by:
getBpmnModelElementInstance in interface BpmnModelExecutionContext
Returns:
the FlowElement corresponding to the current Bpmn Model Element

getBpmnModelInstance

public org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance()
Description copied from interface: BpmnModelExecutionContext
Returns the BpmnModelInstance for the currently executed Bpmn Model

Specified by:
getBpmnModelInstance in interface BpmnModelExecutionContext
Returns:
the current BpmnModelInstance

getProcessEngineServices

public ProcessEngineServices getProcessEngineServices()
Description copied from interface: ProcessEngineServicesAware
Returns the ProcessEngineServices providing access to the public API of the process engine.

Specified by:
getProcessEngineServices in interface ProcessEngineServicesAware
Returns:
the ProcessEngineServices.


Copyright © 2014 camunda services GmbH. All Rights Reserved.