org.camunda.bpm.engine.impl.persistence.entity
Class ExecutionEntity

java.lang.Object
  extended by org.camunda.bpm.engine.impl.persistence.entity.VariableScopeImpl
      extended by org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
All Implemented Interfaces:
Serializable, DelegateExecution, VariableScope, HasRevision, PersistentObject, ActivityExecution, ExecutionListenerExecution, PvmExecution, PvmProcessInstance, InterpretableExecution, Execution, ProcessInstance

public class ExecutionEntity
extends VariableScopeImpl
implements ActivityExecution, ExecutionListenerExecution, Execution, PvmExecution, ProcessInstance, InterpretableExecution, PersistentObject, HasRevision

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

Field Summary
protected  ActivityImpl activity
          current activity
protected  String activityId
          persisted reference to the current position in the diagram within the processDefinition.
protected  String activityInstanceId
          the unique id of the current activity instance
protected  int activityInstanceState
          marks the current activity instance
protected  String activityName
          The name of the current activity position
protected  String businessKey
          persisted reference to the business key.
protected  int cachedEntityState
           
protected  String deleteReason
           
protected  boolean deleteRoot
           
protected static int EVENT_SUBSCRIPTIONS_STATE_BIT
           
protected  String eventName
           
protected  PvmProcessElement eventSource
           
protected  List<EventSubscriptionEntity> eventSubscriptions
           
protected  int executionListenerIndex
           
protected  List<ExecutionEntity> executions
          nested executions representing scopes or concurrent paths
protected  boolean forcedUpdate
           
protected static int INCIDENT_STATE_BIT
           
protected  List<IncidentEntity> incidents
           
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  List<JobEntity> jobs
           
protected static int JOBS_STATE_BIT
           
protected  PvmActivity nextActivity
          an activity which is to be started next
protected  AtomicOperation nextOperation
          next operation.
protected  ExecutionEntity parent
          the parent execution
protected  String parentId
          persisted reference to the parent of this execution.
protected  ProcessDefinitionImpl processDefinition
           
protected  String processDefinitionId
          persisted reference to the processDefinition.
protected  ExecutionEntity processInstance
          the process instance.
protected  String processInstanceId
          persisted reference to the process instance.
protected  ProcessInstanceStartContext processInstanceStartContext
           
protected  ExecutionEntity replacedBy
          when execution structure is pruned during a takeAll, then the original execution has to be resolved to the replaced execution.
protected  int revision
           
protected  ExecutionEntity subProcessInstance
          reference to a subprocessinstance, not-null if currently subprocess is started from this execution
protected  ExecutionEntity superExecution
          super execution, not-null if this execution is part of a subprocess
protected  String superExecutionId
          persisted reference to the super execution of this execution
protected  int suspensionState
           
protected  List<TaskEntity> tasks
           
protected static int TASKS_STATE_BIT
           
protected  TransitionImpl transition
          current transition.
protected  TransitionImpl transitionBeingTaken
          transition that will be taken.
 
Fields inherited from class org.camunda.bpm.engine.impl.persistence.entity.VariableScopeImpl
cachedElContext, id, variableInstances
 
Constructor Summary
ExecutionEntity()
           
ExecutionEntity(ActivityImpl activityImpl)
           
 
Method Summary
 void addEventSubscription(EventSubscriptionEntity eventSubscriptionEntity)
           
 void addIncident(IncidentEntity incident)
           
 void addJob(JobEntity jobEntity)
           
 void addTask(TaskEntity taskEntity)
           
protected  boolean allExecutionsInSameActivity(List<ExecutionEntity> executions)
           
 void cancelScope(String reason)
          Called when a scope is cancelled.
protected  void collectActiveActivityIds(List<String> activeActivityIds)
           
 ExecutionEntity 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 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 ensureEventSubscriptionsInitialized()
           
protected  void ensureExecutionsInitialized()
           
protected  void ensureIncidentsInitialized()
           
protected  void ensureJobsInitialized()
           
protected  void ensureNotSuspended()
           
protected  void ensureParentInitialized()
           
protected  void ensureProcessDefinitionInitialized()
          for setting the process definition, this setter must be used as subclasses can override
protected  void ensureProcessInstanceInitialized()
           
protected  void ensureSubProcessInstanceInitialized()
           
protected  void ensureSuperExecutionInitialized()
           
protected  void ensureTasksInitialized()
           
 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()
           
 ExecutionEntity 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.
 void fireHistoricVariableInstanceCreateEvents()
           
 void forceUpdate()
           
 void forceUpdateActivityInstance()
           
protected  String generateActivityInstanceId(String activityId)
          generates an activity instance id
 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<ExecutionEntity> getAllChildExecutions()
           
 String getBusinessKey()
          The business key for this execution.
 int getCachedEntityState()
           
 List<CompensateEventSubscriptionEntity> getCompensateEventSubscriptions()
           
 List<CompensateEventSubscriptionEntity> getCompensateEventSubscriptions(String activityId)
           
 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()
           
 List<EventSubscriptionEntity> getEventSubscriptions()
           
 List<EventSubscriptionEntity> getEventSubscriptionsInternal()
           
 Integer getExecutionListenerIndex()
           
 List<ExecutionEntity> 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.
 IncidentEntity getIncidentByCauseIncidentId(String causeIncidentId)
           
 List<IncidentEntity> getIncidents()
           
protected  List<IncidentEntity> getIncidentsInternal()
           
 List<JobEntity> getJobs()
           
protected  List<JobEntity> getJobsInternal()
           
 PvmActivity getNextActivity()
          An activity which is to be started next.
 ExecutionEntity 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.
protected  VariableScopeImpl getParentVariableScope()
           
 Object getPersistentState()
          Returns a representation of the object, as would be stored in the database.
 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.
 ExecutionEntity getProcessInstance()
          ensures initialization and returns the process instance.
 String getProcessInstanceId()
          Reference to the overall process instance
 ProcessInstanceStartContext getProcessInstanceStartContext()
           
 ExecutionEntity getReplacedBy()
           
 int getRevision()
           
 int getRevisionNext()
           
protected  ScopeImpl getScopeActivity()
           
protected  ExecutionEntity getSourceActivityExecution()
          used to calculate the sourceActivityExecution
 ExecutionEntity getSubProcessInstance()
           
 ExecutionEntity getSuperExecution()
           
 String getSuperExecutionId()
           
 int getSuspensionState()
           
 List<TaskEntity> getTasks()
           
protected  List<TaskEntity> getTasksInternal()
           
protected  String getToStringIdentity()
           
 TransitionImpl getTransition()
           
 TransitionImpl getTransitionBeingTaken()
           
protected  boolean hasConcurrentSiblings(ExecutionEntity concurrentRoot)
           
 void inactivate()
          Inactivates this execution.
 void initialize()
           
protected  void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
           
 void insert()
           
 void interruptScope(String reason)
          Called when an execution is interrupted.
 boolean isActive()
          returns whether this execution is currently active.
 boolean isActive(String activityId)
           
protected  boolean isAutoFireHistoryEvents()
           
 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.
 boolean isSuspended()
          Indicates if the execution is suspended.
 void leaveActivityInstance()
          invoked to notify the execution that an activity instance is ended.
protected  List<VariableInstanceEntity> loadVariableInstances()
           
protected  ExecutionEntity newExecution()
           
 void performOperation(AtomicOperation executionOperation)
           
 void performOperationSync(AtomicOperation executionOperation)
           
 void remove()
           
 void removeEventSubscription(EventSubscriptionEntity eventSubscriptionEntity)
           
 void removeEventSubscriptions()
           
 void removeIncident(IncidentEntity incident)
           
 void removeJob(JobEntity job)
           
 void removeTask(TaskEntity task)
           
 void replace(InterpretableExecution execution)
           
protected  boolean requiresUnsuspendedExecution(AtomicOperation executionOperation)
           
protected  void scheduleAtomicOperationAsync(AtomicOperation executionOperation)
           
 void setActive(boolean isActive)
          makes this execution active or inactive.
 void setActivity(PvmActivity activity)
           
 void setActivityInstanceId(String activityInstanceId)
           
 void setBusinessKey(String businessKey)
           
 void setCachedEntityState(int cachedEntityState)
           
 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<ExecutionEntity> executions)
           
 void setId(String id)
           
 void setParent(InterpretableExecution parent)
           
 void setParentId(String parentId)
           
 void setProcessDefinition(ProcessDefinitionImpl processDefinition)
           
 void setProcessDefinitionId(String processDefinitionId)
           
 void setProcessInstance(InterpretableExecution processInstance)
           
 void setReplacedBy(InterpretableExecution replacedBy)
           
 void setRevision(int revision)
           
 void setScope(boolean isScope)
          Changes whether this execution is a scope or not
 void setSubProcessInstance(InterpretableExecution subProcessInstance)
           
 void setSuperExecution(ExecutionEntity superExecution)
           
 void setSuspensionState(int suspensionState)
           
 void setTransition(TransitionImpl transition)
           
 void setTransitionBeingTaken(TransitionImpl transitionBeingTaken)
           
 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 startWithFormProperties(Map<String,Object> properties)
           
 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 org.camunda.bpm.engine.impl.persistence.entity.VariableScopeImpl
collectVariableNames, collectVariables, createVariableInstance, createVariableLocal, createVariableLocal, createVariablesLocal, deleteVariableInstanceForExplicitUserCall, deleteVariablesInstanceForLeavingScope, ensureVariableInstancesInitialized, fireHistoricVariableInstanceCreate, fireHistoricVariableInstanceDelete, fireHistoricVariableInstanceUpdate, getCachedElContext, getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal, updateVariableInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
getVariable, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
 
Methods inherited from interface org.camunda.bpm.engine.impl.pvm.PvmExecution
getVariable, getVariables, hasVariable, setVariable
 

Field Detail

EVENT_SUBSCRIPTIONS_STATE_BIT

protected static final int EVENT_SUBSCRIPTIONS_STATE_BIT
See Also:
Constant Field Values

TASKS_STATE_BIT

protected static final int TASKS_STATE_BIT
See Also:
Constant Field Values

JOBS_STATE_BIT

protected static final int JOBS_STATE_BIT
See Also:
Constant Field Values

INCIDENT_STATE_BIT

protected static final int INCIDENT_STATE_BIT
See Also:
Constant Field Values

processDefinition

protected ProcessDefinitionImpl processDefinition

activity

protected ActivityImpl activity
current activity


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 ExecutionEntity processInstance
the process instance. this is the root of the execution tree. the processInstance of a process instance is a self reference.


parent

protected ExecutionEntity parent
the parent execution


executions

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


superExecution

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


subProcessInstance

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


activityInstanceId

protected String activityInstanceId
the unique id of the current activity instance


processInstanceStartContext

protected ProcessInstanceStartContext processInstanceStartContext

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
marks the current activity instance


eventName

protected String eventName

eventSource

protected PvmProcessElement eventSource

executionListenerIndex

protected int executionListenerIndex

eventSubscriptions

protected List<EventSubscriptionEntity> eventSubscriptions

jobs

protected List<JobEntity> jobs

tasks

protected List<TaskEntity> tasks

incidents

protected List<IncidentEntity> incidents

cachedEntityState

protected int cachedEntityState

deleteRoot

protected boolean deleteRoot

deleteReason

protected String deleteReason

replacedBy

protected ExecutionEntity 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

revision

protected int revision

suspensionState

protected int suspensionState

processDefinitionId

protected String processDefinitionId
persisted reference to the processDefinition.

See Also:
processDefinition, setProcessDefinition(ProcessDefinitionImpl), getProcessDefinition()

activityId

protected String activityId
persisted reference to the current position in the diagram within the processDefinition.

See Also:
activity, #setActivity(ActivityImpl), getActivity()

activityName

protected String activityName
The name of the current activity position


processInstanceId

protected String processInstanceId
persisted reference to the process instance.

See Also:
getProcessInstance()

businessKey

protected String businessKey
persisted reference to the business key.


parentId

protected String parentId
persisted reference to the parent of this execution.

See Also:
getParent()

superExecutionId

protected String superExecutionId
persisted reference to the super execution of this execution

See Also:
setSuperExecution(ExecutionEntity)

forcedUpdate

protected boolean forcedUpdate

nextActivity

protected PvmActivity nextActivity
an activity which is to be started next

Constructor Detail

ExecutionEntity

public ExecutionEntity()

ExecutionEntity

public ExecutionEntity(ActivityImpl activityImpl)
Method Detail

createExecution

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

Specified by:
createExecution in interface ActivityExecution

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)

newExecution

protected ExecutionEntity newExecution()

initialize

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

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

startWithFormProperties

public void startWithFormProperties(Map<String,Object> properties)

destroy

public void destroy()
Specified by:
destroy 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

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
Parameters:
completeScope - true if ending the execution contributes to completing the BPMN 2.0 scope

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

getAllChildExecutions

protected List<ExecutionEntity> getAllChildExecutions()

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

hasConcurrentSiblings

protected boolean hasConcurrentSiblings(ExecutionEntity concurrentRoot)

allExecutionsInSameActivity

protected boolean allExecutionsInSameActivity(List<ExecutionEntity> 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

ensureNotSuspended

protected void ensureNotSuspended()

requiresUnsuspendedExecution

protected boolean requiresUnsuspendedExecution(AtomicOperation executionOperation)

scheduleAtomicOperationAsync

protected void scheduleAtomicOperationAsync(AtomicOperation executionOperation)

isActive

public boolean isActive(String activityId)

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

getExecutions

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

Specified by:
getExecutions in interface ActivityExecution

ensureExecutionsInitialized

protected void ensureExecutionsInitialized()

setExecutions

public void setExecutions(List<ExecutionEntity> executions)

findExecution

public ExecutionEntity 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)

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
Specified by:
getBusinessKey in interface ProcessInstance

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

getProcessDefinition

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

Specified by:
getProcessDefinition in interface InterpretableExecution

setProcessDefinitionId

public void setProcessDefinitionId(String processDefinitionId)

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
Specified by:
getProcessDefinitionId in interface ProcessInstance

ensureProcessDefinitionInitialized

protected void ensureProcessDefinitionInitialized()
for setting the process definition, this setter must be used as subclasses can override


setProcessDefinition

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

getProcessInstance

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


ensureProcessInstanceInitialized

protected void ensureProcessInstanceInitialized()

setProcessInstance

public void setProcessInstance(InterpretableExecution processInstance)
Specified by:
setProcessInstance in interface InterpretableExecution

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

getActivity

public ActivityImpl getActivity()
ensures initialization and returns the activity

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

ensureActivityInitialized

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


setActivity

public void setActivity(PvmActivity activity)
Specified by:
setActivity in interface InterpretableExecution

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


forceUpdateActivityInstance

public void forceUpdateActivityInstance()

setActivityInstanceId

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

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

getParent

public ExecutionEntity getParent()
ensures initialization and returns the parent

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

ensureParentInitialized

protected void ensureParentInitialized()

setParent

public void setParent(InterpretableExecution parent)
Specified by:
setParent in interface InterpretableExecution

getSuperExecutionId

public String getSuperExecutionId()

getSuperExecution

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

setSuperExecution

public void setSuperExecution(ExecutionEntity superExecution)

ensureSuperExecutionInitialized

protected void ensureSuperExecutionInitialized()

getSubProcessInstance

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

setSubProcessInstance

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

ensureSubProcessInstanceInitialized

protected void ensureSubProcessInstanceInitialized()

getScopeActivity

protected ScopeImpl getScopeActivity()

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

remove

public void remove()
Specified by:
remove 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

removeEventSubscriptions

public void removeEventSubscriptions()

getReplacedBy

public ExecutionEntity 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

initializeVariableInstanceBackPointer

protected void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
Specified by:
initializeVariableInstanceBackPointer in class VariableScopeImpl

loadVariableInstances

protected List<VariableInstanceEntity> loadVariableInstances()
Specified by:
loadVariableInstances in class VariableScopeImpl

getParentVariableScope

protected VariableScopeImpl getParentVariableScope()
Specified by:
getParentVariableScope in class VariableScopeImpl

getSourceActivityExecution

protected ExecutionEntity getSourceActivityExecution()
used to calculate the sourceActivityExecution

Overrides:
getSourceActivityExecution in class VariableScopeImpl

isAutoFireHistoryEvents

protected boolean isAutoFireHistoryEvents()
Overrides:
isAutoFireHistoryEvents in class VariableScopeImpl
Returns:
true if this variable scope should automatically fire history events for variable modifications.

fireHistoricVariableInstanceCreateEvents

public void fireHistoricVariableInstanceCreateEvents()

getPersistentState

public Object getPersistentState()
Description copied from interface: PersistentObject
Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.

Specified by:
getPersistentState in interface PersistentObject

insert

public void insert()

deleteCascade

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

deleteCascade2

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

getRevisionNext

public int getRevisionNext()
Specified by:
getRevisionNext in interface HasRevision

forceUpdate

public void forceUpdate()

toString

public String toString()
Overrides:
toString in class Object

getToStringIdentity

protected String getToStringIdentity()

getEventSubscriptionsInternal

public List<EventSubscriptionEntity> getEventSubscriptionsInternal()

getEventSubscriptions

public List<EventSubscriptionEntity> getEventSubscriptions()

getCompensateEventSubscriptions

public List<CompensateEventSubscriptionEntity> getCompensateEventSubscriptions()

getCompensateEventSubscriptions

public List<CompensateEventSubscriptionEntity> getCompensateEventSubscriptions(String activityId)

ensureEventSubscriptionsInitialized

protected void ensureEventSubscriptionsInitialized()

addEventSubscription

public void addEventSubscription(EventSubscriptionEntity eventSubscriptionEntity)

removeEventSubscription

public void removeEventSubscription(EventSubscriptionEntity eventSubscriptionEntity)

ensureJobsInitialized

protected void ensureJobsInitialized()

getJobsInternal

protected List<JobEntity> getJobsInternal()

getJobs

public List<JobEntity> getJobs()

addJob

public void addJob(JobEntity jobEntity)

removeJob

public void removeJob(JobEntity job)

ensureIncidentsInitialized

protected void ensureIncidentsInitialized()

getIncidentsInternal

protected List<IncidentEntity> getIncidentsInternal()

getIncidents

public List<IncidentEntity> getIncidents()

addIncident

public void addIncident(IncidentEntity incident)

removeIncident

public void removeIncident(IncidentEntity incident)

getIncidentByCauseIncidentId

public IncidentEntity getIncidentByCauseIncidentId(String causeIncidentId)

ensureTasksInitialized

protected void ensureTasksInitialized()

getTasksInternal

protected List<TaskEntity> getTasksInternal()

getTasks

public List<TaskEntity> getTasks()

addTask

public void addTask(TaskEntity taskEntity)

removeTask

public void removeTask(TaskEntity task)

setCachedEntityState

public void setCachedEntityState(int cachedEntityState)

getCachedEntityState

public int getCachedEntityState()

getProcessInstanceId

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

Specified by:
getProcessInstanceId in interface DelegateExecution
Specified by:
getProcessInstanceId in interface Execution

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

setParentId

public void setParentId(String parentId)

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
Specified by:
getId in interface PersistentObject
Specified by:
getId in interface Execution
Overrides:
getId in class VariableScopeImpl

setId

public void setId(String id)
Specified by:
setId in interface PersistentObject
Overrides:
setId in class VariableScopeImpl

getRevision

public int getRevision()
Specified by:
getRevision in interface HasRevision

setRevision

public void setRevision(int revision)
Specified by:
setRevision in interface HasRevision

getActivityId

public String getActivityId()

getTransition

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

setTransition

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

getTransitionBeingTaken

public TransitionImpl getTransitionBeingTaken()

setTransitionBeingTaken

public void setTransitionBeingTaken(TransitionImpl transitionBeingTaken)

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
Specified by:
isEnded in interface Execution

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

getActivityInstanceState

public int getActivityInstanceState()

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)

isDeleteRoot

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

getSuspensionState

public int getSuspensionState()

setSuspensionState

public void setSuspensionState(int suspensionState)

isSuspended

public boolean isSuspended()
Description copied from interface: Execution
Indicates if the execution is suspended.

Specified by:
isSuspended in interface Execution
Specified by:
isSuspended in interface ProcessInstance

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

disposeProcessInstanceStartContext

public void disposeProcessInstanceStartContext()
Specified by:
disposeProcessInstanceStartContext 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

getCurrentTransitionId

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

Specified by:
getCurrentTransitionId in interface DelegateExecution

getNextActivity

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

Specified by:
getNextActivity in interface ActivityExecution
Returns:
the nextActivity


Copyright © 2014 camunda services GmbH. All Rights Reserved.