|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Execution
a runtime path of execution.
The state of an execution is either active or locked. An active execution is either
executing or waiting for an external trigger. If an execution is not in STATE_ACTIVE_ROOT
,
then it is locked. A locked execution is read only.
When a new execution is created, it is in STATE_ACTIVE_ROOT
.
Some STATE_* constants
are provided that represent the
most commonly used locked states. But the state '...' in the picture indicates
that any string can be provided as the state in the lock method.
If an execution is locked, methods that change the execution will throw
a JbpmException
and the message will reference the actual locking state.
Firing events
,
updating variables
,
updating priority
and
adding comments
are not considered to change an
execution. Also creation
and
removal
of child executions are unchecked,
which means that those methods can be invoked by external API clients and
activity behaviour methods, even while the execution is in a locked state.
Make sure that comparisons between getState()
and the
STATE_* constants
are
done with .equals and not with '==' because if executions are
loaded from persistent storage, a new string is created instead
of the constants.
Field Summary | |
---|---|
static java.lang.String |
STATE_ACTIVE_CONCURRENT
concurrent path of execution that is an active indicator of the current position in the diagram. |
static java.lang.String |
STATE_ACTIVE_ROOT
single (non-concurrent) path of execution that is an active indicator of the current position in the diagram. |
static java.lang.String |
STATE_ASYNC
indicates that this execution is doing an asynchronous continuation. |
static java.lang.String |
STATE_CREATED
between creation of
a new process instance and the start of that
process instance. |
static java.lang.String |
STATE_ENDED
this execution has ended. |
static java.lang.String |
STATE_INACTIVE_CONCURRENT_ROOT
parent of concurrent child executions. |
static java.lang.String |
STATE_INACTIVE_JOIN
concurrent execution that is inactively waiting in a join until other concurrent executions arrive. |
static java.lang.String |
STATE_INACTIVE_SCOPE
parent of a scoped execution. |
static java.lang.String |
STATE_SUSPENDED
indicates that this execution is temporary suspended with the #suspend() method. |
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
findActiveActivityNames()
get the set of all activities that are active. |
Execution |
findActiveExecutionIn(java.lang.String activityName)
search for an execution that is active and in the given activityName. |
Execution |
getExecution(java.lang.String name)
the child execution for the given name or null in case such execution doesn't exist. |
java.util.Collection<? extends Execution> |
getExecutions()
the child executions in the execution structure. |
java.util.Map<java.lang.String,Execution> |
getExecutionsMap()
maps child execution names to execution objects. |
java.lang.String |
getId()
a globally unique identifier for this execution. |
java.lang.String |
getKey()
the optional user provided business key that is unique within one process definition. |
java.lang.String |
getName()
the externally given name or id of this execution. |
Execution |
getParent()
the parent execution in the execution structure. |
int |
getPriority()
indicates low priorities with negative values and high priorities with positive values. |
java.lang.String |
getProcessDefinitionId()
id of the process definition used for this execution |
Execution |
getProcessInstance()
the main path of execution in the execution structure. |
java.lang.String |
getState()
the state of this execution. |
boolean |
hasExecution(java.lang.String executionName)
indicates if this execution has a child execution with the given executionName |
boolean |
isActive(java.lang.String activityName)
is the given activity active. |
boolean |
isEnded()
is this execution ended |
boolean |
isProcessInstance()
is this a process instance |
boolean |
isSuspended()
is this execution suspended ? |
Field Detail |
---|
static final java.lang.String STATE_CREATED
creation of
a new process instance
and the start
of that
process instance. The motivation of this state is that variables can be
set programmatically on the process instance so that they can be used during
initializations of variables and timers
static final java.lang.String STATE_ACTIVE_ROOT
static final java.lang.String STATE_ACTIVE_CONCURRENT
static final java.lang.String STATE_INACTIVE_CONCURRENT_ROOT
static final java.lang.String STATE_INACTIVE_SCOPE
static final java.lang.String STATE_INACTIVE_JOIN
static final java.lang.String STATE_SUSPENDED
#suspend()
method. Human tasks of a suspended execution
shouldn't show up in people's task list and timers of suspended
executions shouldn't fire and the execution is locked. Make sure that comparisons are
done with .equals and not with '==' because if executions are
loaded from persistent storage, a new string is created instead
of the constants.
static final java.lang.String STATE_ASYNC
static final java.lang.String STATE_ENDED
Method Detail |
---|
java.lang.String getName()
java.lang.String getKey()
java.lang.String getId()
java.lang.String getState()
boolean isProcessInstance()
boolean isEnded()
boolean isSuspended()
int getPriority()
Execution getProcessInstance()
Execution getParent()
java.util.Collection<? extends Execution> getExecutions()
java.util.Map<java.lang.String,Execution> getExecutionsMap()
Execution getExecution(java.lang.String name)
boolean hasExecution(java.lang.String executionName)
Execution findActiveExecutionIn(java.lang.String activityName)
findActiveActivityNames()
java.util.Set<java.lang.String> findActiveActivityNames()
findActiveExecutionIn(String)
boolean isActive(java.lang.String activityName)
java.lang.String getProcessDefinitionId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |