org.camunda.bpm.engine.impl.pvm.delegate
Interface ActivityExecution

All Superinterfaces:
BaseDelegateExecution, BpmnModelExecutionContext, DelegateExecution, ProcessEngineServicesAware, VariableScope
All Known Implementing Classes:
ExecutionEntity, ExecutionImpl, PvmExecutionImpl

public interface ActivityExecution
extends DelegateExecution

Author:
Tom Baeyens, Joram Barrez, Daniel Meyer, Falko Menge

Method Summary
 void cancelScope(String string)
           
 ActivityExecution createExecution()
          creates a new execution.
 ActivityExecution createExecution(boolean initializeExecutionStartContext)
          creates a new execution.
 PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition)
          creates a new sub process instance.
 PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey)
           
 PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition, String businessKey, String caseInstanceId)
           
 void end(boolean isScopeComplete)
          ends this execution.
 void endCompensation()
          Execution finished compensation.
 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<ActivityExecution> findInactiveConcurrentExecutions(PvmActivity activity)
          Retrieves all executions which are concurrent and inactive at the given activity.
 PvmActivity getActivity()
          returns the current PvmActivity of the execution.
 String getActivityInstanceId()
          return the Id of the activity instance currently executed by this execution
 List<? extends ActivityExecution> getExecutions()
          returns the list of execution of which this execution the parent of.
 PvmActivity getNextActivity()
          An activity which is to be started next.
 ActivityExecution getParent()
          returns the parent of this execution, or null if there no parent.
 String getParentActivityInstanceId()
          return the Id of the parent activity instance currently executed by this execution
 void inactivate()
          Inactivates this execution.
 void interruptScope(String reason)
          Called when an execution is interrupted.
 boolean isActive()
          returns whether this execution is currently active.
 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 isEnded()
          returns whether this execution has ended or not.
 boolean isProcessInstanceExecution()
          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.
 void remove()
           
 void setActive(boolean isActive)
          makes this execution active or inactive.
 void setActivity(PvmActivity cancelBoundaryEvent)
           
 void setActivityInstanceId(String id)
           
 void setConcurrent(boolean isConcurrent)
          changes the concurrent indicator on this execution.
 void setScope(boolean isScope)
          Changes whether this execution is a scope or not
 void signal(String string, Object signalData)
           
 void take(PvmTransition transition)
          leaves the current activity by taking the given transition.
 void takeAll(List<PvmTransition> outgoingTransitions, List<? extends ActivityExecution> joinedExecutions)
          Takes the given outgoing transitions, and potentially reusing the given list of executions that were previously joined.
 
Methods inherited from interface org.camunda.bpm.engine.delegate.DelegateExecution
getCurrentActivityId, getCurrentActivityName, getCurrentTransitionId, getParentId, getProcessBusinessKey, getProcessDefinitionId, getProcessInstanceId
 
Methods inherited from interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
getBusinessKey, getEventName, getId
 
Methods inherited from interface org.camunda.bpm.engine.delegate.VariableScope
getVariable, getVariableLocal, getVariableLocalTyped, getVariableLocalTyped, getVariableNames, getVariableNamesLocal, getVariables, getVariableScopeKey, getVariablesLocal, getVariablesLocalTyped, getVariablesLocalTyped, getVariablesTyped, getVariablesTyped, getVariableTyped, getVariableTyped, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariableLocal, setVariables, setVariablesLocal
 
Methods inherited from interface org.camunda.bpm.engine.delegate.BpmnModelExecutionContext
getBpmnModelElementInstance, getBpmnModelInstance
 
Methods inherited from interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
getProcessEngineServices
 

Method Detail

getActivity

PvmActivity getActivity()
returns the current PvmActivity of the execution.


enterActivityInstance

void enterActivityInstance()
invoked to notify the execution that a new activity instance is started


leaveActivityInstance

void leaveActivityInstance()
invoked to notify the execution that an activity instance is ended.


setActivityInstanceId

void setActivityInstanceId(String id)

getActivityInstanceId

String getActivityInstanceId()
return the Id of the activity instance currently executed by this execution

Specified by:
getActivityInstanceId in interface DelegateExecution

getParentActivityInstanceId

String getParentActivityInstanceId()
return the Id of the parent activity instance currently executed by this execution

Specified by:
getParentActivityInstanceId in interface DelegateExecution

take

void take(PvmTransition transition)
leaves the current activity by taking the given transition.


createExecution

ActivityExecution createExecution()
creates a new execution. This execution will be the parent of the newly created execution. properties processDefinition, processInstance and activity will be initialized.


createExecution

ActivityExecution createExecution(boolean initializeExecutionStartContext)
creates a new execution. This execution will be the parent of the newly created execution. properties processDefinition, processInstance and activity will be initialized.


createSubProcessInstance

PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition)
creates a new sub process instance. The current execution will be the super execution of the created execution.

Parameters:
processDefinition - The PvmProcessDefinition of the subprocess.

createSubProcessInstance

PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition,
                                            String businessKey)
Parameters:
processDefinition - The PvmProcessDefinition of the subprocess.
businessKey - the business key of the process instance
See Also:
createSubProcessInstance(PvmProcessDefinition)

createSubProcessInstance

PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition,
                                            String businessKey,
                                            String caseInstanceId)
Parameters:
processDefinition - The PvmProcessDefinition of the subprocess.
businessKey - the business key of the process instance
caseInstanceId - the case instance id of the process instance
See Also:
createSubProcessInstance(PvmProcessDefinition)

getParent

ActivityExecution getParent()
returns the parent of this execution, or null if there no parent.


getExecutions

List<? extends ActivityExecution> getExecutions()
returns the list of execution of which this execution the parent of.


end

void end(boolean isScopeComplete)
ends this execution.


endCompensation

void endCompensation()
Execution finished compensation. Removes this execution and notifies listeners.


setActive

void setActive(boolean isActive)
makes this execution active or inactive.


isActive

boolean isActive()
returns whether this execution is currently active.


isEnded

boolean isEnded()
returns whether this execution has ended or not.


setConcurrent

void setConcurrent(boolean isConcurrent)
changes the concurrent indicator on this execution.


isConcurrent

boolean isConcurrent()
returns whether this execution is concurrent or not.


isProcessInstanceExecution

boolean isProcessInstanceExecution()
returns whether this execution is a process instance or not.


inactivate

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


isScope

boolean isScope()
Returns whether this execution is a scope.


setScope

void setScope(boolean isScope)
Changes whether this execution is a scope or not


isCompleteScope

boolean isCompleteScope()
Returns whether this execution completed the parent scope.


isCanceled

boolean isCanceled()
Returns whether this execution has been canceled.


findInactiveConcurrentExecutions

List<ActivityExecution> findInactiveConcurrentExecutions(PvmActivity activity)
Retrieves all executions which are concurrent and inactive at the given activity.


takeAll

void takeAll(List<PvmTransition> outgoingTransitions,
             List<? extends ActivityExecution> joinedExecutions)
Takes the given outgoing transitions, and potentially reusing the given list of executions that were previously joined.


executeActivity

void executeActivity(PvmActivity activity)
Executes the ActivityBehavior associated with the given activity.


interruptScope

void interruptScope(String reason)
Called when an execution is interrupted. This will remove all associated entities such as event subscriptions, jobs, ...


getNextActivity

PvmActivity getNextActivity()
An activity which is to be started next.


remove

void remove()

signal

void signal(String string,
            Object signalData)

cancelScope

void cancelScope(String string)

setActivity

void setActivity(PvmActivity cancelBoundaryEvent)


Copyright © 2014 camunda services GmbH. All rights reserved.