|
||||||||||
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
ActivityBehaviour
implementations.
Field Summary |
---|
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 |
Method Summary | ||
---|---|---|
void |
end()
ends this execution and all of its child executions. |
|
void |
end(OpenExecution executionToEnd)
ends the given execution and all it's child executions. |
|
void |
end(OpenExecution executionToEnd,
java.lang.String state)
ends the given execution and all it's child executions with a user defined status. |
|
void |
end(java.lang.String state)
ends this execution and all it's child executions with a user defined status. |
|
void |
execute(Activity activity)
executes the given activity. |
|
void |
execute(java.lang.String activityName)
executes the given nested activity. |
|
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. |
|
Activity |
getActivity()
the current activity. |
|
java.lang.String |
getActivityName()
represents the current position in the process by indicating the name of the current activity. |
|
|
getExtension(java.lang.Class<T> extensionClass)
way to access process language extensions in the execution without having to cast. |
|
Transition |
getTransition()
the current transition indicating the position in the process definition graph. |
|
void |
historyActivityEnd()
marks the end of an activity for history purposes. |
|
void |
historyActivityEnd(java.lang.String transitionName)
marks the end of an activity with a specific transitionName for history purposes. |
|
void |
historyActivityStart()
marks the start of an activity for history purposes. |
|
void |
historyAutomatic()
records the end of an automatic event. |
|
void |
historyDecision(java.lang.String transitionName)
record history event that specifies for a decision activity which transition has been taken. |
|
void |
setActivity(Activity destination)
position this execution in the destination activity. |
|
void |
setActivity(Activity destination,
Execution execution)
position the given execution in the destination activity |
|
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 activity until an external trigger is given with one of the #signal() methods. |
Methods inherited from interface org.jbpm.api.model.OpenExecution |
---|
createVariable, createVariable, findActiveExecutionIn, getExecution, getParent, getProcessDefinition, getProcessInstance, getSubProcessInstance, getVariable, getVariableKeys, getVariables, hasVariable, hasVariables, removeVariable, removeVariables, setState, setVariable, setVariables |
Methods inherited from interface org.jbpm.api.Execution |
---|
findActiveActivityNames, getExecutions, getExecutionsMap, getId, getKey, getName, getPriority, getProcessDefinitionId, getState, hasExecution, isActive, isEnded, isProcessInstance, isSuspended |
Methods inherited from interface org.jbpm.api.model.Discussable |
---|
createComment, getComments, removeComment |
Method Detail |
---|
java.lang.String getActivityName()
Activity getActivity()
void waitForSignal()
#signal()
methods.
void takeDefaultTransition()
This method can only be called from inside
ExternalActivityBehaviour
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 activity (hence the process language)that
will decide how to interpret the signal.
JbpmException
- in case there is no default transition in the current activity
or in case this method is called from inside an ActivityBehaviour
void take(java.lang.String transitionName)
This method can only be called
from inside ExternalActivityBehaviour
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 activity (hence the process language)that
will decide how to interpret the signal.
Transitions will be looked up recursively starting from the
current activity
and then up the activity-parent-hierarchy
transitionName
- is the name of the transition to take. A null value will
match the first unnamed transition.
JbpmException
- in case no such transition is found in the current activity
or in case this method is called from inside an ActivityBehaviour
.void take(Transition transition)
This method can only be called
from inside ExternalActivityBehaviour
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 activity (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 activity. The motivation for that is that in case of groups, that check can become too 'expensive'.
void take(Transition transition, Execution execution)
JbpmException
- if the execution is not part of this process instance.void execute(java.lang.String activityName)
The activityName is looked up in the current activity's nested activities.
This method can only be called
from inside ExternalActivityBehaviour
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 activity (hence the process language)that
will decide how to interpret the signal.
void execute(Activity activity)
This method can only be called
from inside ExternalActivityBehaviour
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 activity (hence the process language)that
will decide how to interpret the signal.
void setActivity(Activity destination)
void setActivity(Activity destination, Execution execution)
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.
void end(java.lang.String state)
It is not recommended to use any of
the defined statuses in Execution
as that may case unpredictable
side effects.
The execution will be removed from it's parent.
void end(OpenExecution executionToEnd)
void end(OpenExecution executionToEnd, java.lang.String state)
void fire(java.lang.String eventName, ObservableElement eventSource)
#getEventSource()
, event if the events are
registered to parent's of the given eventSource.
Transition getTransition()
<T> T getExtension(java.lang.Class<T> extensionClass)
void setPriority(int priority)
setPriority
in interface OpenExecution
void historyDecision(java.lang.String transitionName)
void historyAutomatic()
void historyActivityStart()
void historyActivityEnd()
void historyActivityEnd(java.lang.String transitionName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |