|
||||||||||
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
,
then it is locked. A locked execution is read only.
When a new execution is created, it is in STATE_ACTIVE
. To change
the state to a locked state, use #lock(String)
.
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
either executing or in a wait state waiting for a signal. |
static java.lang.String |
STATE_ASYNC
indicates that this execution is doing an asynchronous continuation. |
static java.lang.String |
STATE_CANCELLED
this execution has been cancelled before it came to completion. |
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
parents with concurrent child executions are inactive. |
static java.lang.String |
STATE_SUSPENDED
indicates that this execution is temporary suspended with the #suspend() method. |
Method Summary | |
---|---|
java.lang.String |
getActivityName()
represents the current position in the process by indicating the name of the current activity. |
long |
getDbid()
|
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. |
int |
getPriority()
indicates low priorities with negative values and high priorities with positive values. |
java.lang.String |
getState()
the state of this execution. |
boolean |
isActive()
is this execution active ? |
boolean |
isEnded()
is this execution ended |
boolean |
isLocked()
is this execution locked ? |
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
static final java.lang.String STATE_INACTIVE
static final java.lang.String STATE_ENDED
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_CANCELLED
ExecutionService.endProcessInstance(String, String)
.
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.
Method Detail |
---|
long getDbid()
java.lang.String getName()
java.lang.String getKey()
java.lang.String getId()
java.lang.String getActivityName()
java.lang.String getState()
boolean isProcessInstance()
boolean isActive()
isLocked()
.
boolean isLocked()
locked
? This is the inverse of isActive()
.
boolean isEnded()
boolean isSuspended()
int getPriority()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |