org.jbpm.pvm.internal.model
Class ExecutionImpl

java.lang.Object
  extended by org.jbpm.pvm.internal.model.ScopeInstanceImpl
      extended by org.jbpm.pvm.internal.model.ExecutionImpl
All Implemented Interfaces:
java.io.Serializable, ActivityExecution, Execution, EventListenerExecution, OpenExecution, OpenProcessInstance, ProcessInstance, ClientExecution, ClientProcessInstance

public class ExecutionImpl
extends ScopeInstanceImpl
implements ClientProcessInstance, ActivityExecution, EventListenerExecution

Author:
Tom Baeyens, Huisheng Xu
See Also:
Serialized Form

Nested Class Summary
static class ExecutionImpl.Propagation
           
 
Field Summary
protected  java.lang.String activityName
          persistent activity reference
protected  java.util.Queue<AtomicOperation> atomicOperations
          the queue of atomic operations to be performed for this execution.
protected  EventImpl event
           
protected  AtomicOperation eventCompletedOperation
           
protected  int eventListenerIndex
           
protected  ObservableElementImpl eventSource
           
protected  java.util.Collection<ExecutionImpl> executions
          are concurrent executions that related to this execution.
protected  java.util.Map<java.lang.String,Execution> executionsMap
          caches the child executions by execution name.
protected  java.lang.Long historyActivityInstanceDbid
          reference to the current activity instance history record
protected  java.util.Date historyActivityStart
          start time of the activity for history purposes (not persisted)
protected  java.lang.String id
          a unique id for this execution.
protected  java.lang.String key
          a key for this execution. typically this is an externally provided reference that is unique within the scope of the process definition.
protected  java.lang.String name
          an optional name for this execution.
protected  ExecutionImpl parent
          the parent child relation of executions is convenient for some forms of concurrency.
protected  int priority
           
protected  ProcessDefinitionImpl processDefinition
          transient cached process definition.
protected  java.lang.String processDefinitionId
          persistent process definition reference
protected  ExecutionImpl processInstance
           
protected  ExecutionImpl.Propagation propagation
           
protected  ExecutionImpl subProcessInstance
          the sub process link in case of sub process execution
protected  ExecutionImpl superProcessExecution
          the super process link in case this is a sub process execution
protected  java.util.Map<java.lang.String,SwimlaneImpl> swimlanes
          swimlanes
protected  java.util.Map<java.lang.String,Variable> systemVariables
           
protected  TransitionImpl transition
          transition is not to be made persistable by default
 
Fields inherited from class org.jbpm.pvm.internal.model.ScopeInstanceImpl
dbid, dbversion, elContext, hasVariables, state, suspendHistoryState, variables
 
Fields inherited from interface org.jbpm.api.Execution
STATE_ACTIVE_CONCURRENT, STATE_ACTIVE_ROOT, STATE_ASYNC, STATE_CREATED, STATE_ENDED, STATE_INACTIVE_CONCURRENT_ROOT, STATE_INACTIVE_JOIN, STATE_INACTIVE_SCOPE, STATE_SUSPENDED
 
Constructor Summary
ExecutionImpl()
           
 
Method Summary
protected  java.util.Set<java.lang.String> addActiveActivityNames(java.util.Set<java.lang.String> activityNames)
           
 void addExecution(ExecutionImpl execution)
           
 void addSwimlane(SwimlaneImpl swimlane)
           
protected  void checkActive()
           
protected  void composeIds()
           
 ExecutionImpl createExecution()
           
 ExecutionImpl createExecution(java.lang.String name)
           
 ExecutionImpl createScope(ScopeElementImpl scope)
           
 ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition)
           
 ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition, java.lang.String key)
           
 SwimlaneImpl createSwimlane(java.lang.String swimlaneName)
           
 void createSystemVariable(java.lang.String key, java.lang.Object value)
           
 void createSystemVariable(java.lang.String key, java.lang.Object value, java.lang.String typeName)
           
 ExecutionImpl destroyScope(CompositeElementImpl scope)
           
protected  void destroyTimers(CompositeElementImpl scope)
           
 void end()
          ends this execution and all of its child executions.
 void end(OpenExecution executionToEnd)
           
 void end(OpenExecution executionToEnd, java.lang.String state)
           
 void end(java.lang.String state)
          ends this execution and all it's child executions with a user defined status.
 ExecutionImpl endActivity(ActivityImpl activity)
           
 boolean equals(java.lang.Object o)
           
 void execute(Activity activity)
           
 void execute(java.lang.String activityName)
           
 java.util.Set<java.lang.String> findActiveActivityNames()
           
 ExecutionImpl findActiveExecutionIn(java.lang.String activityName)
           
protected  TransitionImpl findDefaultTransition()
           
static EventImpl findEvent(ObservableElementImpl observableElement, java.lang.String eventName)
           
protected  TransitionImpl findTransition(java.lang.String transitionName)
          by default this will use ActivityImpl.findOutgoingTransition(String) to search for the outgoing transition, which includes a search over the parent chain of the current activity.
 void fire(java.lang.String eventName, ObservableElement eventSource)
           
 void fire(java.lang.String eventName, ObservableElementImpl observableElement, AtomicOperation eventCompletedOperation)
           
 ActivityImpl getActivity()
           
 java.lang.String getActivityName()
           
 EventImpl getEvent()
           
 AtomicOperation getEventCompletedOperation()
           
 int getEventListenerIndex()
           
 ObservableElementImpl getEventSource()
           
 ExecutionImpl getExecution()
           
 ExecutionImpl getExecution(java.lang.String name)
           
 java.util.Collection<ExecutionImpl> getExecutions()
           
 java.util.Map<java.lang.String,Execution> getExecutionsMap()
           
 java.lang.Long getHistoryActivityInstanceDbid()
           
 java.util.Date getHistoryActivityStart()
           
 java.lang.String getId()
           
 SwimlaneImpl getInitializedSwimlane(SwimlaneDefinitionImpl swimlaneDefinition)
           
 boolean getIsProcessInstance()
           
 java.lang.String getKey()
           
 java.lang.String getName()
           
 ExecutionImpl getParent()
           
 ScopeInstanceImpl getParentVariableScope()
           
 int getPriority()
           
 ProcessDefinitionImpl getProcessDefinition()
           
 java.lang.String getProcessDefinitionId()
           
 ExecutionImpl getProcessInstance()
           
 ExecutionImpl.Propagation getPropagation()
           
 ExecutionImpl getSubProcessInstance()
           
 ExecutionImpl getSuperProcessExecution()
           
 SwimlaneImpl getSwimlane(java.lang.String swimlaneName)
           
 java.lang.Object getSystemVariable(java.lang.String key)
           
 ExecutionImpl getTimerExecution()
           
 TransitionImpl getTransition()
           
 void handleException(ObservableElementImpl observableElement, EventImpl event, EventListenerReference eventListenerReference, java.lang.Exception exception, java.lang.String rethrowMessage)
           
 boolean hasAsyncEndEvent(java.util.List<ActivityImpl> leftActivities)
           
 boolean hasExecution(java.lang.String name)
           
 void historyActivityEnd()
           
 void historyActivityEnd(java.lang.String transitionName)
           
 void historyActivityStart()
           
 void historyAutomatic()
           
 void historyDecision(java.lang.String transitionName)
           
 void initializeAssignments(AssignableDefinitionImpl assignableDefinition, Assignable assignable)
          tasks and swimlane assignment.
 void initializeProcessInstance(ProcessDefinitionImpl processDefinition, java.lang.String key)
           
protected  ExecutionImpl initializeScopes()
           
 boolean isActive(java.lang.String activityName)
           
 boolean isEnded()
           
 void moveTo(ActivityImpl destination)
           
protected  ExecutionImpl newChildExecution()
           
 void performAtomicOperation(AtomicOperation operation)
           
 void performAtomicOperationSync(AtomicOperation operation)
           
 void proceed()
           
 void removeExecution(ExecutionImpl child)
           
 void removeSwimlane(SwimlaneImpl swimlane)
           
 boolean removeSystemVariable(java.lang.String key)
           
protected  java.lang.String resolveAssignmentExpression(java.lang.String expression, java.lang.String expressionLanguage)
           
 java.lang.Object resolveExpression(java.lang.String expression, java.lang.String language)
          Important: Only use this if resolving an expression on another execution then the current execution TODO: remove this operation once the environment/executionContext is refactored
 void resume()
          resumes an execution.
protected  void save()
           
 void sendContinuationMessage(AtomicOperation operation)
           
 void setActivity(Activity activity)
           
 void setActivity(Activity activity, Execution execution)
           
 void setActivity(ActivityImpl activity)
           
 void setEvent(EventImpl event)
           
 void setEventCompletedOperation(AtomicOperation eventCompletedOperation)
           
 void setEventListenerIndex(int eventListenerIndex)
           
 void setEventSource(ObservableElementImpl eventSource)
           
 void setExecutions(java.util.Collection<ExecutionImpl> executions)
           
 void setHistoryActivityInstanceDbid(java.lang.Long historyActivityInstanceDbid)
           
 void setHistoryActivityStart(java.util.Date historyActivityStart)
           
 void setId(java.lang.String id)
           
 void setKey(java.lang.String key)
           
 void setName(java.lang.String name)
           
 void setParent(ExecutionImpl parent)
           
 void setPriority(int priority)
           
 void setProcessDefinition(ProcessDefinitionImpl processDefinition)
           
 void setProcessInstance(ExecutionImpl processInstance)
           
 void setPropagation(ExecutionImpl.Propagation propagation)
           
 void setSubProcessInstance(ExecutionImpl subProcessExecution)
           
 void setSuperProcessExecution(ExecutionImpl superProcessExecution)
           
 void setSystemVariable(java.lang.String key, java.lang.Object value)
           
 void setTransition(TransitionImpl transition)
           
 void signal()
          feeds a external trigger into this execution.
 void signal(Execution execution)
          feeds a external trigger into the given execution.
 void signal(java.util.Map<java.lang.String,?> parameters)
          feeds an external trigger into the execution with parameters.
 void signal(java.util.Map<java.lang.String,?> parameters, Execution execution)
          feeds an external trigger into a given execution with parameters.
 void signal(java.lang.String signal)
          feeds a named external trigger into the execution.
 void signal(java.lang.String signalName, Execution execution)
          feeds a named external trigger into a given execution.
 void signal(java.lang.String signal, java.util.Map<java.lang.String,?> parameters)
          feeds a named external trigger into the execution with parameters.
 void signal(java.lang.String signalName, java.util.Map<java.lang.String,?> parameters, Execution execution)
          feeds a named external trigger into a given execution with parameters.
 void start()
          starts this process instance
 ExecutionImpl startActivity(ActivityImpl activity)
           
 ClientProcessInstance startSubProcessInstance(ClientProcessDefinition processDefinition)
           
 ClientProcessInstance startSubProcessInstance(ClientProcessDefinition processDefinition, java.lang.String key)
           
 void suspend()
          suspends this execution and all it's child executions.
 void take(java.lang.String transitionName)
           
 void take(Transition transition)
           
 void take(Transition transition, Execution execution)
           
 void takeDefaultTransition()
           
 java.lang.String toString()
           
 void waitForSignal()
           
 
Methods inherited from class org.jbpm.pvm.internal.model.ScopeInstanceImpl
createTimer, createTimer, createVariable, createVariable, createVariableObject, getDbid, getElContext, getState, getTask, getVariable, getVariableKeys, getVariableObject, getVariables, hasVariable, hasVariables, initializeTimers, initializeVariables, isActive, isSuspended, newTimer, removeVariable, removeVariables, setElContext, setState, setVariable, setVariables
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbpm.api.model.OpenExecution
createVariable, getVariable, getVariableKeys, getVariables, hasVariable, hasVariables, removeVariable, removeVariables, setState, setVariable, setVariables
 
Methods inherited from interface org.jbpm.api.Execution
getState, isSuspended
 

Field Detail

name

protected java.lang.String name
an optional name for this execution. can be used to differentiate concurrent paths of execution like e.g. the 'shipping' and 'billing' paths.


key

protected java.lang.String key
a key for this execution. typically this is an externally provided reference that is unique within the scope of the process definition.


id

protected java.lang.String id
a unique id for this execution.


executions

protected java.util.Collection<ExecutionImpl> executions
are concurrent executions that related to this execution.


parent

protected ExecutionImpl parent
the parent child relation of executions is convenient for some forms of concurrency.


processInstance

protected ExecutionImpl processInstance

superProcessExecution

protected ExecutionImpl superProcessExecution
the super process link in case this is a sub process execution


subProcessInstance

protected ExecutionImpl subProcessInstance
the sub process link in case of sub process execution


swimlanes

protected java.util.Map<java.lang.String,SwimlaneImpl> swimlanes
swimlanes


historyActivityInstanceDbid

protected java.lang.Long historyActivityInstanceDbid
reference to the current activity instance history record


historyActivityStart

protected java.util.Date historyActivityStart
start time of the activity for history purposes (not persisted)


priority

protected int priority

systemVariables

protected java.util.Map<java.lang.String,Variable> systemVariables

processDefinitionId

protected java.lang.String processDefinitionId
persistent process definition reference


activityName

protected java.lang.String activityName
persistent activity reference


processDefinition

protected ProcessDefinitionImpl processDefinition
transient cached process definition. persistence is managed in processDefinitionId


transition

protected TransitionImpl transition
transition is not to be made persistable by default


event

protected EventImpl event

eventCompletedOperation

protected AtomicOperation eventCompletedOperation

eventListenerIndex

protected int eventListenerIndex

eventSource

protected ObservableElementImpl eventSource

executionsMap

protected transient java.util.Map<java.lang.String,Execution> executionsMap
caches the child executions by execution name. This member might be null and is only created from the executions in case its needed. Note that not all executions are forced to have a name and duplicates are allowed. In case the executions change, the executionsMap can be nulled or also updated (but a check needs to be added whether it exists).


atomicOperations

protected java.util.Queue<AtomicOperation> atomicOperations
the queue of atomic operations to be performed for this execution.


propagation

protected ExecutionImpl.Propagation propagation
Constructor Detail

ExecutionImpl

public ExecutionImpl()
Method Detail

initializeProcessInstance

public void initializeProcessInstance(ProcessDefinitionImpl processDefinition,
                                      java.lang.String key)

save

protected void save()

composeIds

protected void composeIds()

start

public void start()
Description copied from interface: ClientProcessInstance
starts this process instance

Specified by:
start in interface ClientProcessInstance

initializeScopes

protected ExecutionImpl initializeScopes()

createScope

public ExecutionImpl createScope(ScopeElementImpl scope)

destroyScope

public ExecutionImpl destroyScope(CompositeElementImpl scope)

destroyTimers

protected void destroyTimers(CompositeElementImpl scope)
Overrides:
destroyTimers in class ScopeInstanceImpl

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

end

public void end()
Description copied from interface: ClientExecution
ends this execution and all of its child executions.

All child executions will be ended and removed. This execution will not be removed from its parent.

This method should not be called in ActivityBehaviours. It can be called from outside the process execution and in ExternalActivityBehaviours.

Specified by:
end in interface ActivityExecution
Specified by:
end in interface ClientExecution

end

public void end(java.lang.String state)
Description copied from interface: ClientExecution
ends this execution and all it's child executions with a user defined status.

Specified by:
end in interface ActivityExecution
Specified by:
end in interface ClientExecution

end

public void end(OpenExecution executionToEnd)

end

public void end(OpenExecution executionToEnd,
                java.lang.String state)

signal

public void signal()
Description copied from interface: ClientExecution
feeds a external trigger into this execution.

Typically a signal causes the execution to proceed, but that doesn't necessarily has to be the case . The ExternalActivityBehaviour is responsible for interpreting the signal and acting upon it.

A signal can optionally be given a signal name, a map of parameters or both.

Since it's an external trigger, this method requires that this execution is waiting for an external trigger. So this method must be called as an external client and can not be called while this execution is executing. In an ActivityBehaviour for example you're not allowed to call the signal on the execution cause it is executing. But you are allowed to invoke this method on any other execution (at least, if that one is waiting for an external trigger).

Typically a signal will cause the execution to start executing, but that is not a must. What happens with this signal is defined in the ExternalActivityBehaviour#signal(Execution, String, Map) of the current activity.

Specified by:
signal in interface ClientExecution
See Also:
ClientExecution.signal(String)

signal

public void signal(java.lang.String signal)
Description copied from interface: ClientExecution
feeds a named external trigger into the execution.

In each state, a number of things can happen. The signal parameter specifies which of these things is happening. It's somewhat similar to a method name in the invocation of an object.

Specified by:
signal in interface ClientExecution
See Also:
See the unnamed signal for more information

signal

public void signal(java.util.Map<java.lang.String,?> parameters)
Description copied from interface: ClientExecution
feeds an external trigger into the execution with parameters.

Specified by:
signal in interface ClientExecution
See Also:
See the unnamed signal for more information

signal

public void signal(java.lang.String signal,
                   java.util.Map<java.lang.String,?> parameters)
Description copied from interface: ClientExecution
feeds a named external trigger into the execution with parameters.

In each state, a number of things can happen. The signal parameter specifies which of these things is happening. It's somewhat similar to a method name in the invocation of an object.

The parameters parameter provide extra information to the signal. Typically, the parameters are set as variables but the process language can overwrite that behaviour in the current activity. See ExternalActivityBehaviour#signal(Execution, String, Map) for more information.

Specified by:
signal in interface ClientExecution
See Also:
See the unnamed signal for more information

signal

public void signal(Execution execution)
Description copied from interface: ClientExecution
feeds a external trigger into the given execution.

Typically a signal causes the execution to proceed, but that doesn't necessarily has to be the case . The ExternalActivityBehaviour is responsible for interpreting the signal and acting upon it.

A signal can optionally be given a signal name, a map of parameters or both.

Since it's an external trigger, this method requires that this execution is waiting for an external trigger. So this method must be called as an external client and can not be called while this execution is executing. In an ActivityBehaviour for example you're not allowed to call the signal on the execution cause it is executing. But you are allowed to invoke this method on any other execution (at least, if that one is waiting for an external trigger).

Typically a signal will cause the execution to start executing, but that is not a must. What happens with this signal is defined in the ExternalActivityBehaviour#signal(Execution, String, Map) of the current activity.

Specified by:
signal in interface ClientExecution
See Also:
ClientExecution.signal(String)

signal

public void signal(java.lang.String signalName,
                   Execution execution)
Description copied from interface: ClientExecution
feeds a named external trigger into a given execution.

In each state, a number of things can happen. The signal parameter specifies which of these things is happening. It's somewhat similar to a method name in the invocation of an object.

Specified by:
signal in interface ClientExecution
See Also:
See the unnamed signal for more information

signal

public void signal(java.util.Map<java.lang.String,?> parameters,
                   Execution execution)
Description copied from interface: ClientExecution
feeds an external trigger into a given execution with parameters.

Specified by:
signal in interface ClientExecution
See Also:
See the unnamed signal for more information

signal

public void signal(java.lang.String signalName,
                   java.util.Map<java.lang.String,?> parameters,
                   Execution execution)
Description copied from interface: ClientExecution
feeds a named external trigger into a given execution with parameters.

In each state, a number of things can happen. The signal parameter specifies which of these things is happening. It's somewhat similar to a method name in the invocation of an object.

The parameters parameter provide extra information to the signal. Typically, the parameters are set as variables but the process language can overwrite that behaviour in the current activity. See ExternalActivityBehaviour#signal(Execution, String, Map) for more information.

Specified by:
signal in interface ClientExecution
See Also:
See the unnamed signal for more information

takeDefaultTransition

public void takeDefaultTransition()
Specified by:
takeDefaultTransition in interface ActivityExecution
See Also:
Execution#takeDefaultTransition()

take

public void take(java.lang.String transitionName)
Specified by:
take in interface ActivityExecution
See Also:
Execution#take(String)

take

public void take(Transition transition)
See Also:
Execution#takeDefaultTransition()

take

public void take(Transition transition,
                 Execution execution)

execute

public void execute(java.lang.String activityName)
Specified by:
execute in interface ActivityExecution
See Also:
Execution#execute(String)

execute

public void execute(Activity activity)
See Also:
Execution#execute(Activity)

waitForSignal

public void waitForSignal()
Specified by:
waitForSignal in interface ActivityExecution

proceed

public void proceed()

setActivity

public void setActivity(Activity activity,
                        Execution execution)

setActivity

public void setActivity(Activity activity)

fire

public void fire(java.lang.String eventName,
                 ObservableElement eventSource)

fire

public void fire(java.lang.String eventName,
                 ObservableElementImpl observableElement,
                 AtomicOperation eventCompletedOperation)

findEvent

public static EventImpl findEvent(ObservableElementImpl observableElement,
                                  java.lang.String eventName)

moveTo

public void moveTo(ActivityImpl destination)

startActivity

public ExecutionImpl startActivity(ActivityImpl activity)

endActivity

public ExecutionImpl endActivity(ActivityImpl activity)

performAtomicOperation

public void performAtomicOperation(AtomicOperation operation)

sendContinuationMessage

public void sendContinuationMessage(AtomicOperation operation)

performAtomicOperationSync

public void performAtomicOperationSync(AtomicOperation operation)

resolveExpression

public java.lang.Object resolveExpression(java.lang.String expression,
                                          java.lang.String language)
Important: Only use this if resolving an expression on another execution then the current execution TODO: remove this operation once the environment/executionContext is refactored


handleException

public void handleException(ObservableElementImpl observableElement,
                            EventImpl event,
                            EventListenerReference eventListenerReference,
                            java.lang.Exception exception,
                            java.lang.String rethrowMessage)

initializeAssignments

public void initializeAssignments(AssignableDefinitionImpl assignableDefinition,
                                  Assignable assignable)
tasks and swimlane assignment. SwimlaneDefinitionImpl is base class for TaskDefinitionImpl. Both Task and Swimlane implement Assignable.


resolveAssignmentExpression

protected java.lang.String resolveAssignmentExpression(java.lang.String expression,
                                                       java.lang.String expressionLanguage)

addSwimlane

public void addSwimlane(SwimlaneImpl swimlane)

getSwimlane

public SwimlaneImpl getSwimlane(java.lang.String swimlaneName)

removeSwimlane

public void removeSwimlane(SwimlaneImpl swimlane)

getInitializedSwimlane

public SwimlaneImpl getInitializedSwimlane(SwimlaneDefinitionImpl swimlaneDefinition)

createSwimlane

public SwimlaneImpl createSwimlane(java.lang.String swimlaneName)

createExecution

public ExecutionImpl createExecution()

createExecution

public ExecutionImpl createExecution(java.lang.String name)

newChildExecution

protected ExecutionImpl newChildExecution()

addExecution

public void addExecution(ExecutionImpl execution)

getExecution

public ExecutionImpl getExecution(java.lang.String name)
Specified by:
getExecution in interface Execution
Specified by:
getExecution in interface OpenExecution
See Also:
Execution.getExecution(String)

removeExecution

public void removeExecution(ExecutionImpl child)

getExecutionsMap

public java.util.Map<java.lang.String,Execution> getExecutionsMap()
Specified by:
getExecutionsMap in interface Execution

hasExecution

public boolean hasExecution(java.lang.String name)
Specified by:
hasExecution in interface Execution

isActive

public boolean isActive(java.lang.String activityName)
Specified by:
isActive in interface Execution

findActiveActivityNames

public java.util.Set<java.lang.String> findActiveActivityNames()
Specified by:
findActiveActivityNames in interface Execution

addActiveActivityNames

protected java.util.Set<java.lang.String> addActiveActivityNames(java.util.Set<java.lang.String> activityNames)

findActiveExecutionIn

public ExecutionImpl findActiveExecutionIn(java.lang.String activityName)
Specified by:
findActiveExecutionIn in interface Execution
Specified by:
findActiveExecutionIn in interface OpenExecution

createSystemVariable

public void createSystemVariable(java.lang.String key,
                                 java.lang.Object value)

createSystemVariable

public void createSystemVariable(java.lang.String key,
                                 java.lang.Object value,
                                 java.lang.String typeName)

setSystemVariable

public void setSystemVariable(java.lang.String key,
                              java.lang.Object value)

getSystemVariable

public java.lang.Object getSystemVariable(java.lang.String key)

removeSystemVariable

public boolean removeSystemVariable(java.lang.String key)

createSubProcessInstance

public ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition)

createSubProcessInstance

public ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition,
                                                      java.lang.String key)

startSubProcessInstance

public ClientProcessInstance startSubProcessInstance(ClientProcessDefinition processDefinition)

startSubProcessInstance

public ClientProcessInstance startSubProcessInstance(ClientProcessDefinition processDefinition,
                                                     java.lang.String key)

suspend

public void suspend()
Description copied from interface: ClientExecution
suspends this execution and all it's child executions. Human tasks of a suspended execution shouldn't show up in people's task list and timers of suspended executions shouldn't fire.

Specified by:
suspend in interface ClientExecution
Overrides:
suspend in class ScopeInstanceImpl
See Also:
Execution#suspend()

resume

public void resume()
Description copied from interface: ClientExecution
resumes an execution. Inverse of ClientExecution.suspend().

Specified by:
resume in interface ClientExecution
Overrides:
resume in class ScopeInstanceImpl
See Also:
Execution#resume()

checkActive

protected void checkActive()

isEnded

public boolean isEnded()
Specified by:
isEnded in interface Execution

getParentVariableScope

public ScopeInstanceImpl getParentVariableScope()
Overrides:
getParentVariableScope in class ScopeInstanceImpl

getTimerExecution

public ExecutionImpl getTimerExecution()
Overrides:
getTimerExecution in class ScopeInstanceImpl

findTransition

protected TransitionImpl findTransition(java.lang.String transitionName)
by default this will use ActivityImpl.findOutgoingTransition(String) to search for the outgoing transition, which includes a search over the parent chain of the current activity. This method allows process languages to overwrite this default implementation of the transition lookup by transitionName.


findDefaultTransition

protected TransitionImpl findDefaultTransition()

historyAutomatic

public void historyAutomatic()

historyDecision

public void historyDecision(java.lang.String transitionName)

historyActivityStart

public void historyActivityStart()

historyActivityEnd

public void historyActivityEnd()

historyActivityEnd

public void historyActivityEnd(java.lang.String transitionName)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getProcessDefinition

public ProcessDefinitionImpl getProcessDefinition()

setProcessDefinition

public void setProcessDefinition(ProcessDefinitionImpl processDefinition)

getActivity

public ActivityImpl getActivity()
Specified by:
getActivity in interface OpenExecution

setActivity

public void setActivity(ActivityImpl activity)

getActivityName

public java.lang.String getActivityName()
Specified by:
getActivityName in interface ActivityExecution

hasAsyncEndEvent

public boolean hasAsyncEndEvent(java.util.List<ActivityImpl> leftActivities)

getIsProcessInstance

public boolean getIsProcessInstance()
Specified by:
getIsProcessInstance in interface Execution

getExecution

public ExecutionImpl getExecution()
Overrides:
getExecution in class ScopeInstanceImpl

getTransition

public TransitionImpl getTransition()

setTransition

public void setTransition(TransitionImpl transition)

getEvent

public EventImpl getEvent()

getEventSource

public ObservableElementImpl getEventSource()

getExecutions

public java.util.Collection<ExecutionImpl> getExecutions()
Specified by:
getExecutions in interface Execution

getName

public java.lang.String getName()
Specified by:
getName in interface Execution

getParent

public ExecutionImpl getParent()
Specified by:
getParent in interface Execution
Specified by:
getParent in interface OpenExecution

getPriority

public int getPriority()
Specified by:
getPriority in interface Execution

setEvent

public void setEvent(EventImpl event)

setEventSource

public void setEventSource(ObservableElementImpl eventSource)

setPriority

public void setPriority(int priority)
Specified by:
setPriority in interface ActivityExecution
Specified by:
setPriority in interface EventListenerExecution
Specified by:
setPriority in interface OpenExecution

getProcessInstance

public ExecutionImpl getProcessInstance()
Specified by:
getProcessInstance in interface Execution
Specified by:
getProcessInstance in interface OpenExecution

setProcessInstance

public void setProcessInstance(ExecutionImpl processInstance)

getKey

public java.lang.String getKey()
Specified by:
getKey in interface Execution

getPropagation

public ExecutionImpl.Propagation getPropagation()

setPropagation

public void setPropagation(ExecutionImpl.Propagation propagation)

setName

public void setName(java.lang.String name)

setExecutions

public void setExecutions(java.util.Collection<ExecutionImpl> executions)

setParent

public void setParent(ExecutionImpl parent)

getSuperProcessExecution

public ExecutionImpl getSuperProcessExecution()

setSuperProcessExecution

public void setSuperProcessExecution(ExecutionImpl superProcessExecution)

getSubProcessInstance

public ExecutionImpl getSubProcessInstance()
Specified by:
getSubProcessInstance in interface Execution
Specified by:
getSubProcessInstance in interface OpenExecution

setSubProcessInstance

public void setSubProcessInstance(ExecutionImpl subProcessExecution)

setKey

public void setKey(java.lang.String key)

getId

public java.lang.String getId()
Specified by:
getId in interface Execution

setId

public void setId(java.lang.String id)

getHistoryActivityInstanceDbid

public java.lang.Long getHistoryActivityInstanceDbid()

setHistoryActivityInstanceDbid

public void setHistoryActivityInstanceDbid(java.lang.Long historyActivityInstanceDbid)

getHistoryActivityStart

public java.util.Date getHistoryActivityStart()

setHistoryActivityStart

public void setHistoryActivityStart(java.util.Date historyActivityStart)

getProcessDefinitionId

public java.lang.String getProcessDefinitionId()
Specified by:
getProcessDefinitionId in interface Execution

getEventListenerIndex

public int getEventListenerIndex()

setEventListenerIndex

public void setEventListenerIndex(int eventListenerIndex)

getEventCompletedOperation

public AtomicOperation getEventCompletedOperation()

setEventCompletedOperation

public void setEventCompletedOperation(AtomicOperation eventCompletedOperation)


Copyright © 2010 JBoss Community. All Rights Reserved.