|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActivityExecution
view upon an path of execution
exposed to Activity
implementations.
Field Summary |
---|
Fields inherited from interface org.ow2.bonita.pvm.Execution |
---|
STATE_ACTIVE, STATE_ASYNC, STATE_CANCELLED, STATE_CREATED, STATE_ENDED, STATE_INACTIVE, STATE_SUSPENDED |
Method Summary | ||
---|---|---|
void |
addLog(ProcessLog processLog)
adds a log to this execution. |
|
ClientProcessInstance |
beginSubProcessInstance(ClientProcessDefinition processDefinition)
creates and begins a sub process related to this path of execution. |
|
ClientProcessInstance |
beginSubProcessInstance(ClientProcessDefinition processDefinition,
java.lang.String key)
creates and begins a sub process related to this path of execution. |
|
void |
cancel()
ends this execution and assigns the state Execution.STATE_CANCELLED . |
|
Execution |
createExecution()
creates a child execution. |
|
Execution |
createExecution(Execution parent)
creates a new child execution under the given parent. |
|
Execution |
createExecution(java.lang.String name)
creates a child execution with the given name. |
|
Execution |
createExecution(java.lang.String name,
Execution parent)
creates a new child execution under the given parent with the given name. |
|
ClientProcessInstance |
createSubProcessInstance(ClientProcessDefinition processDefinition)
creates a sub process related to this path of execution. |
|
ClientProcessInstance |
createSubProcessInstance(ClientProcessDefinition processDefinition,
java.lang.String key)
creates a sub process related to this path of execution. |
|
void |
end()
ends this execution and all of its child executions. |
|
void |
end(java.lang.String state)
ends this execution and all it's child executions with a user defined status. |
|
void |
execute(Node node)
executes the given node. |
|
void |
execute(java.lang.String nodeName)
executes the given nested node. |
|
void |
fire(java.lang.String eventName,
ObservableElement eventSource)
fires the event on the given eventSource and then propagates the event up to the eventSource's parent chain. |
|
|
getExtension(java.lang.Class<T> extensionClass)
way to access process language extensions in the execution without having to cast. |
|
Node |
getPreviousNode()
returns the previously executed node only if Node.isPreviousNeeded() is set to true. |
|
Transition |
getPreviousTransition()
returns the previously taken transition only if Node.isPreviousNeeded() is set to true. |
|
Transition |
getTransition()
the current transition indicating the position in the process definition graph. |
|
void |
move(Node destination)
position this execution in the destination node. |
|
void |
move(Node destination,
Execution execution)
position the given execution in the destination node |
|
void |
removeExecution(Execution child)
removes the child execution from this execution. |
|
void |
removeExecution(Execution child,
Execution parent)
removes the child execution from the given parent. |
|
void |
setPriority(int priority)
setter for the priority. |
|
void |
take(java.lang.String transitionName)
takes the outgoing transition with the given name. |
|
void |
take(Transition transition)
takes the given outgoing transition. |
|
void |
take(Transition transition,
Execution execution)
let's the given execution take the transition. |
|
void |
takeDefaultTransition()
takes the default transition. |
|
void |
waitForSignal()
makes this execution wait in the current node until an external trigger is given with one of the #signal() methods. |
Methods inherited from interface org.ow2.bonita.pvm.model.OpenExecution |
---|
createVariable, createVariable, getExecution, getExecutions, getExecutionsMap, getJobs, getNode, getParent, getProcessDefinition, getProcessInstance, getSubProcessInstance, getVariable, getVariableKeys, getVariables, hasExecution, hasVariable, hasVariables, removeVariable, removeVariables, setVariable, setVariables |
Methods inherited from interface org.ow2.bonita.pvm.Execution |
---|
getDbid, getId, getKey, getName, getNodeName, getPriority, getState, isActive, isEnded, isFinished, isLocked, isSuspended |
Methods inherited from interface org.ow2.bonita.pvm.model.Discussable |
---|
createComment, getComments, removeComment |
Method Detail |
---|
void waitForSignal()
#signal()
methods.
void takeDefaultTransition()
This method can only be called from inside ExternalActivity
implementations and in rare occasions also from outside of the execution
(from an external client while the process is in a wait state). For
external clients, it is more normal to use the #signal()
method as
in that case, it's the current node (hence the process language)that will
decide how to interpret the signal.
PvmException
- in case there is no default transition in the current node or in
case this method is called from inside an Activity
void take(java.lang.String transitionName)
This method can only be called from inside ExternalActivity
implementations and in rare occasions also from outside of the execution
(from an external client while the process is in a wait state). For
external clients, it is more normal to use the #signal(String)
method as in that case, it's the current node (hence the process
language)that will decide how to interpret the signal.
Transitions will be looked up recursively starting from the
current node
and then up the node-parent-hierarchy
transitionName
- is the name of the transition to take. A null value will match the
first unnamed transition.
PvmException
- in case no such transition is found in the
current node
or in case this method is called from inside an
Activity
.void take(Transition transition)
This method can only be called from inside ExternalActivity
implementations and in rare occasions also from outside of the execution
(from an external client while the process is in a wait state). For
external clients, it is more normal to use the #signal(String)
method as in that case, it's the current node (hence the process
language)that will decide how to interpret the signal.
CAUTION: It's up to the client to make sure that this transition makes sense as there is no check whether the given transition is an outgoing transition of the current node. The motivation for that is that in case of superstates, that check can become too 'expensive'.
void take(Transition transition, Execution execution)
PvmException
- if the execution is not part of this process instance.void execute(java.lang.String nodeName)
The nodeName is looked up in the current node's nested nodes.
This method can only be called from inside ExternalActivity
implementations and in rare occasions also from outside of the execution
(from an external client while the process is in a wait state). For
external clients, it is more normal to use the #signal(String)
method as in that case, it's the current node (hence the process
language)that will decide how to interpret the signal.
void execute(Node node)
This method can only be called from inside ExternalActivity
implementations and in rare occasions also from outside of the execution
(from an external client while the process is in a wait state). For
external clients, it is more normal to use the #signal(String)
method as in that case, it's the current node (hence the process
language)that will decide how to interpret the signal.
void move(Node destination)
void move(Node destination, Execution execution)
Execution createExecution()
#createExecution(Execution, String)
for more information.
Execution createExecution(java.lang.String name)
#createExecution(Execution, String)
for more information.
Execution createExecution(Execution parent)
#createExecution(Execution, String)
for more information.
PvmException
- if the given parent is not in this execution's process instance.Execution createExecution(java.lang.String name, Execution parent)
inactivate
the parent execution
automatically.
PvmException
- if the given parent is not in this execution's process instance.void removeExecution(Execution child)
active
.
void removeExecution(Execution child, Execution parent)
active
.
ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition)
PvmDbSession
in the Environment
.
ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition, java.lang.String key)
PvmDbSession
in the Environment
.
ClientProcessInstance beginSubProcessInstance(ClientProcessDefinition processDefinition)
PvmDbSession
in the
Environment
.
ClientProcessInstance beginSubProcessInstance(ClientProcessDefinition processDefinition, java.lang.String key)
PvmDbSession
in the
Environment
.
void end()
The execution will be removed from it's parent. Potentially this can cause a parent execution to start executing in case this is the last concurrent execution for which the parent is waiting.
This method should not be called in Activity
s. It can be called
from outside the process execution and in ExternalActivity
s.
void cancel()
Execution.STATE_CANCELLED
.
end(String)
void end(java.lang.String state)
It is not recommended to use any of the defined
statuses
as that may case unpredictable side effects.
The execution will be removed from it's parent.
void fire(java.lang.String eventName, ObservableElement eventSource)
#getEventSource()
, event if the events are
registered to parent's of the given eventSource.
void addLog(ProcessLog processLog)
Transition getTransition()
<T> T getExtension(java.lang.Class<T> extensionClass)
void setPriority(int priority)
setPriority
in interface OpenExecution
Node getPreviousNode()
Node.isPreviousNeeded()
is set to true.
Transition getPreviousTransition()
Node.isPreviousNeeded()
is set to true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |