|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.bonita.pvm.internal.model.ExecutionImpl
public class ExecutionImpl
Nested Class Summary | |
---|---|
static class |
ExecutionImpl.Propagation
|
Field Summary | |
---|---|
protected java.util.Queue<AtomicOperation> |
atomicOperations
the queue of atomic operations to be performed for this execution. |
protected java.util.Set<CommentImpl> |
comments
the free text comments users make on this execution |
protected long |
dbid
|
protected int |
dbversion
|
protected EventImpl |
event
|
protected ObservableElementImpl |
eventSource
|
protected java.lang.Exception |
exception
|
static AtomicOperation |
EXECUTE_NODE
|
protected java.util.Collection<ExecutionImpl> |
executions
are concurrent executions that related to this execution. |
protected java.util.Map<java.lang.String,OpenExecution> |
executionsMap
caches the child executions by execution name. |
protected java.lang.String |
id
a unique id for this execution. |
protected java.util.Set<JobImpl<?>> |
jobs
|
protected java.lang.String |
key
a key for this execution. |
protected java.lang.String |
name
an optional name for this execution. |
protected int |
nextLogIndex
maintains the index of the next log record. |
protected NodeImpl |
node
current node |
protected ExecutionImpl |
parent
the parent child relation of executions is convenient for some forms of concurrency. |
protected Node |
previousNode
|
protected Transition |
previousTransition
|
protected int |
priority
|
static AtomicOperation |
PROCEED_TO_DESTINATION
|
protected PVMProcessDefinitionImpl |
processDefinition
|
protected ExecutionImpl |
processInstance
|
protected ProcessModificationsImpl |
processModifications
|
static AtomicOperation |
PROPAGATE_TO_PARENT
|
protected ExecutionImpl.Propagation |
propagation
|
protected java.lang.String |
state
|
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 |
static AtomicOperation |
TAKE_TRANSITION
|
protected TransitionImpl |
transition
transition is not to be made persistable by default |
protected NodeImpl |
transitionOrigin
the node from which the transition was taken. |
protected java.util.Map<java.lang.String,Variable> |
variables
|
Fields inherited from interface org.ow2.bonita.pvm.Execution |
---|
STATE_ACTIVE, STATE_ASYNC, STATE_CANCELLED, STATE_CREATED, STATE_ENDED, STATE_INACTIVE, STATE_SUSPENDED |
Constructor Summary | |
---|---|
ExecutionImpl()
|
Method Summary | ||
---|---|---|
void |
addComment(CommentImpl comment)
|
|
void |
addExecution(Execution execution)
|
|
void |
addLog(ProcessLog processLog)
adds a log to this execution. |
|
void |
begin()
starts this process instance |
|
ExecutionImpl |
beginNode(NodeImpl node)
|
|
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 . |
|
protected void |
checkLock()
|
|
Comment |
createComment(java.lang.String message)
create a comment |
|
ExecutionImpl |
createExecution()
creates a child execution. |
|
Execution |
createExecution(Execution parent)
creates a new child execution under the given parent. |
|
ExecutionImpl |
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. |
|
ExecutionImpl |
createScope(CompositeElementImpl scope)
|
|
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 |
createTimer(java.lang.String eventName,
java.lang.String signalName,
java.lang.String dueDateDescription)
|
|
void |
createTimer(java.lang.String eventName,
java.lang.String signalName,
java.lang.String dueDateDescription,
java.util.Date dueDate,
java.lang.String repeat,
java.lang.Boolean isExclusive,
java.lang.Integer retries)
|
|
void |
createTimer(java.lang.String eventName,
java.lang.String signalName,
java.lang.String dueDateDescription,
java.lang.String repeat)
|
|
void |
createVariable(java.lang.String key,
java.lang.Object value)
create a new variable in this execution scope and determine the type automagically. |
|
void |
createVariable(java.lang.String key,
java.lang.Object value,
java.lang.String typeName)
create a new variable in this execution scope with the given type name. |
|
void |
createVariable(java.lang.String key,
java.lang.Object value,
java.lang.String typeName,
Type type)
|
|
void |
createVariable(java.lang.String key,
java.lang.Object value,
Type type)
|
|
ExecutionImpl |
destroyScope(CompositeElementImpl scope)
|
|
protected void |
destroyTimers(CompositeElementImpl scope)
|
|
protected void |
destroyVariables(CompositeElementImpl scope,
ExecutionImpl outerExecution)
|
|
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. |
|
ExecutionImpl |
endNode(NodeImpl node)
|
|
boolean |
equals(java.lang.Object o)
|
|
void |
execute(Node node)
executes the given node. |
|
void |
execute(java.lang.String nodeName)
executes the given nested node. |
|
protected TransitionImpl |
findDefaultTransition()
|
|
protected TransitionImpl |
findTransition(java.lang.String transitionName)
by default this will use NodeImpl.findOutgoingTransition(String) to
search for the outgoing transition, which includes a search over the parent
chain of the current 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. |
|
java.util.List<Comment> |
getComments()
all comments. |
|
long |
getDbid()
|
|
Event |
getEvent()
the event that is being fired, part of the current position in the process graph. |
|
ObservableElement |
getEventSource()
the original object that fired the event, part of the current position in the process graph. |
|
java.lang.Exception |
getException()
the exception in case an exception handler is handling an exception. |
|
ExecutionImpl |
getExecution(java.lang.String name)
the child execution for the given name or null in case such execution doesn't exist. |
|
java.util.Collection<OpenExecution> |
getExecutions()
the child executions in the execution structure. |
|
java.util.Map<java.lang.String,OpenExecution> |
getExecutionsMap()
maps child execution names to execution objects. |
|
|
getExtension(java.lang.Class<T> extensionClass)
way to access process language extensions in the execution without having to cast. |
|
java.lang.String |
getId()
a globally unique identifier for this execution. |
|
java.util.Set<Job> |
getJobs()
timers for this execution scope |
|
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. |
|
NodeImpl |
getNode()
the current node |
|
java.lang.String |
getNodeName()
represents the current position in the process by indicating the name of the current node. |
|
ExecutionImpl |
getParent()
the parent execution in the execution structure. |
|
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. |
|
int |
getPriority()
indicates low priorities with negative values and high priorities with positive values. |
|
PVMProcessDefinitionImpl |
getProcessDefinition()
the process definition for this execution. |
|
ExecutionImpl |
getProcessInstance()
the main path of execution in the execution structure. |
|
ProcessModificationsImpl |
getProcessModifications()
|
|
ExecutionImpl.Propagation |
getPropagation()
|
|
java.lang.String |
getState()
the state of this execution. |
|
ExecutionImpl |
getSubProcessInstance()
the related sub process execution. |
|
ExecutionImpl |
getSuperProcessExecution()
|
|
TransitionImpl |
getTransition()
the current transition indicating the position in the process definition graph. |
|
NodeImpl |
getTransitionOrigin()
|
|
java.lang.Object |
getVariable(java.lang.String key)
retrieve the value for the given key. |
|
java.util.Set<java.lang.String> |
getVariableKeys()
a non-null set that contains all the keys present in this scope. |
|
Variable |
getVariableObject(java.lang.String key)
|
|
java.util.Map<java.lang.String,java.lang.Object> |
getVariables()
a non-null map containing all the key-value pairs in this scope. |
|
void |
handleException(ObservableElementImpl observableElement,
EventImpl event,
EventListenerReference eventListenerReference,
java.lang.Exception exception,
java.lang.String rethrowMessage)
|
|
boolean |
hasExecution(java.lang.String name)
indicates if this execution has a child execution with the given executionName |
|
boolean |
hasVariable(java.lang.String key)
indicates presenve of the given key. |
|
boolean |
hasVariables()
indicates if there are keys in this scope. |
|
void |
initializeProcessInstance(PVMProcessDefinitionImpl processDefinition,
java.lang.String key)
|
|
protected ExecutionImpl |
initializeScopes()
|
|
protected void |
initializeTimers(CompositeElementImpl scope)
|
|
protected void |
initializeVariables(CompositeElementImpl scope,
ExecutionImpl outerExecution)
|
|
protected TimerImpl |
instantiateTimer()
|
|
boolean |
isActive()
is this execution active ? This is the inverse of Execution.isLocked() . |
|
boolean |
isEnded()
is this execution ended normally ? |
|
boolean |
isFinished()
is this execution ended or cancelled ? |
|
boolean |
isLocked()
is this execution locked ? This is the inverse of
Execution.isActive() . |
|
boolean |
isSuspended()
is this execution suspended ? |
|
void |
lock(java.lang.String state)
|
|
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 |
moveTo(NodeImpl destination)
|
|
protected ExecutionImpl |
newChildExecution()
|
|
int |
nextLogIndex()
|
|
void |
performAtomicOperation(AtomicOperation operation)
|
|
void |
performAtomicOperationSync(AtomicOperation operation)
|
|
void |
proceed()
|
|
protected void |
propagateEvent(java.lang.String eventName,
ObservableElement eventSource,
ObservableElementImpl observableElement)
this method enables specific process languages to overwrite the event propagation behaviour |
|
void |
removeComment(Comment comment)
remove a comment |
|
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. |
|
boolean |
removeVariable(java.lang.String key)
remove the key-value pair for the given key from this scope. |
|
void |
removeVariables()
removes all variables in this scope |
|
void |
resume()
resumes an execution. |
|
void |
sendContinuationMessage(AtomicOperation operation)
|
|
void |
setComments(java.util.Set<CommentImpl> comments)
|
|
void |
setEvent(EventImpl event)
|
|
void |
setEventSource(ObservableElementImpl eventSource)
|
|
void |
setException(java.lang.Exception exception)
|
|
void |
setExecutions(java.util.Collection<ExecutionImpl> executions)
|
|
void |
setId(java.lang.String id)
|
|
void |
setKey(java.lang.String key)
|
|
void |
setName(java.lang.String name)
|
|
void |
setNode(NodeImpl node)
|
|
void |
setParent(ExecutionImpl parent)
|
|
void |
setPreviousNode(Node previousNode)
|
|
void |
setPreviousTransition(Transition previousTransition)
|
|
void |
setPriority(int priority)
setter for the priority. |
|
void |
setProcessDefinition(PVMProcessDefinitionImpl processDefinition)
|
|
void |
setProcessInstance(ExecutionImpl processInstance)
|
|
void |
setProcessModifications(ProcessModificationsImpl processModifications)
|
|
void |
setPropagation(ExecutionImpl.Propagation propagation)
|
|
void |
setState(java.lang.String state)
|
|
void |
setSubProcessInstance(ExecutionImpl subProcessExecution)
|
|
void |
setSuperProcessExecution(ExecutionImpl superProcessExecution)
|
|
void |
setTransition(TransitionImpl transition)
|
|
void |
setTransitionOrigin(NodeImpl transitionOrigin)
|
|
void |
setVariable(java.lang.String key,
java.lang.Object value)
updates or creates a variable for the given value. |
|
void |
setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
sets all given variables. |
|
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,java.lang.Object> parameters)
feeds an external trigger into the execution with
parameters. |
|
void |
signal(java.util.Map<java.lang.String,java.lang.Object> 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,java.lang.Object> parameters)
feeds a named external trigger into the execution with
parameters. |
|
void |
signal(java.lang.String signalName,
java.util.Map<java.lang.String,java.lang.Object> parameters,
Execution execution)
feeds a named external trigger into a given execution
with parameters. |
|
void |
suspend()
suspends this execution and all it's child executions. |
|
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. |
|
java.lang.String |
toString()
|
|
void |
unlock()
|
|
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 class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final AtomicOperation EXECUTE_NODE
public static final AtomicOperation PROCEED_TO_DESTINATION
public static final AtomicOperation TAKE_TRANSITION
public static final AtomicOperation PROPAGATE_TO_PARENT
protected long dbid
protected int dbversion
protected java.lang.String name
protected java.lang.String key
protected java.lang.String id
protected java.lang.String state
Execution
protected PVMProcessDefinitionImpl processDefinition
protected NodeImpl node
protected TransitionImpl transition
protected NodeImpl transitionOrigin
protected EventImpl event
protected ObservableElementImpl eventSource
protected java.util.Collection<ExecutionImpl> executions
protected ExecutionImpl parent
protected ExecutionImpl processInstance
protected java.util.Map<java.lang.String,Variable> variables
protected java.util.Set<JobImpl<?>> jobs
protected ExecutionImpl superProcessExecution
protected ExecutionImpl subProcessInstance
protected java.util.Set<CommentImpl> comments
protected int priority
protected int nextLogIndex
protected transient java.util.Map<java.lang.String,OpenExecution> executionsMap
executions
change, the executionsMap can be nulled or
also updated (but a check needs to be added whether it exists).
protected java.util.Queue<AtomicOperation> atomicOperations
protected ExecutionImpl.Propagation propagation
protected Node previousNode
protected Transition previousTransition
protected java.lang.Exception exception
protected ProcessModificationsImpl processModifications
Constructor Detail |
---|
public ExecutionImpl()
Method Detail |
---|
public void initializeProcessInstance(PVMProcessDefinitionImpl processDefinition, java.lang.String key)
public void begin()
ClientProcessInstance
begin
in interface ClientProcessInstance
protected ExecutionImpl initializeScopes()
public ExecutionImpl createScope(CompositeElementImpl scope)
public ExecutionImpl destroyScope(CompositeElementImpl scope)
public java.lang.String toString()
toString
in class java.lang.Object
public void end()
ActivityExecution
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.
end
in interface ActivityExecution
end
in interface ClientExecution
public void end(java.lang.String state)
ActivityExecution
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.
end
in interface ActivityExecution
end
in interface ClientExecution
public void cancel()
ActivityExecution
Execution.STATE_CANCELLED
.
cancel
in interface ActivityExecution
cancel
in interface ClientExecution
ActivityExecution.end(String)
public void suspend()
ClientExecution
suspend
in interface ClientExecution
Execution#suspend()
public void resume()
ClientExecution
ClientExecution.suspend()
.
resume
in interface ClientExecution
Execution#resume()
public void signal()
ClientExecution
Typically a signal causes the execution to proceed, but that doesn't
necessarily has to be the case . The ExternalActivity
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 Activity
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
ExternalActivity#signal(Execution, String, Map)
of the
current node
.
signal
in interface ClientExecution
ClientExecution.signal(String)
public void signal(java.lang.String signal)
ClientExecution
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.
signal
in interface ClientExecution
See the unnamed signal for more information
public void signal(java.util.Map<java.lang.String,java.lang.Object> parameters)
ClientExecution
an external trigger
into the execution with
parameters.
signal
in interface ClientExecution
See the unnamed signal for more information
public void signal(java.lang.String signal, java.util.Map<java.lang.String,java.lang.Object> parameters)
ClientExecution
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 node. See
ExternalActivity#signal(Execution, String, Map)
for more
information.
signal
in interface ClientExecution
See the unnamed signal for more information
public void signal(Execution execution)
ClientExecution
Typically a signal causes the execution to proceed, but that doesn't
necessarily has to be the case . The ExternalActivity
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 Activity
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
ExternalActivity#signal(Execution, String, Map)
of the
current node
.
signal
in interface ClientExecution
ClientExecution.signal(String)
public void signal(java.lang.String signalName, Execution execution)
ClientExecution
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.
signal
in interface ClientExecution
See the unnamed signal for more information
public void signal(java.util.Map<java.lang.String,java.lang.Object> parameters, Execution execution)
ClientExecution
an external trigger
into a given execution with
parameters.
signal
in interface ClientExecution
See the unnamed signal for more information
public void signal(java.lang.String signalName, java.util.Map<java.lang.String,java.lang.Object> parameters, Execution execution)
ClientExecution
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 node. See
ExternalActivity#signal(Execution, String, Map)
for more
information.
signal
in interface ClientExecution
See the unnamed signal for more information
public void takeDefaultTransition()
ActivityExecution
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.
takeDefaultTransition
in interface ActivityExecution
Execution#takeDefaultTransition()
public void take(java.lang.String transitionName)
ActivityExecution
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
take
in interface ActivityExecution
transitionName
- is the name of the transition to take. A null value will match the
first unnamed transition.Execution#take(String)
public void take(Transition transition)
ActivityExecution
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'.
take
in interface ActivityExecution
Execution#takeDefaultTransition()
public void take(Transition transition, Execution execution)
ActivityExecution
take
in interface ActivityExecution
public void execute(java.lang.String nodeName)
ActivityExecution
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.
execute
in interface ActivityExecution
Execution#execute(String)
public void execute(Node node)
ActivityExecution
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.
execute
in interface ActivityExecution
Execution#execute(Node)
public void waitForSignal()
ActivityExecution
#signal()
methods.
waitForSignal
in interface ActivityExecution
public void proceed()
public void move(Node destination, Execution execution)
ActivityExecution
move
in interface ActivityExecution
public void move(Node destination)
ActivityExecution
move
in interface ActivityExecution
public void moveTo(NodeImpl destination)
public ExecutionImpl beginNode(NodeImpl node)
public ExecutionImpl endNode(NodeImpl node)
public void performAtomicOperation(AtomicOperation operation)
protected void initializeVariables(CompositeElementImpl scope, ExecutionImpl outerExecution)
protected void destroyVariables(CompositeElementImpl scope, ExecutionImpl outerExecution)
public void createVariable(java.lang.String key, java.lang.Object value)
OpenExecution
createVariable
in interface OpenExecution
public void createVariable(java.lang.String key, java.lang.Object value, java.lang.String typeName)
OpenExecution
createVariable
in interface OpenExecution
public void createVariable(java.lang.String key, java.lang.Object value, Type type)
public void createVariable(java.lang.String key, java.lang.Object value, java.lang.String typeName, Type type)
public void setVariable(java.lang.String key, java.lang.Object value)
OpenExecution
setVariable
in interface OpenExecution
public void setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
OpenExecution
sets
all given variables. Existing
key-value pairs for which there is no key in the provided variables will
not be removed.
setVariables
in interface OpenExecution
public java.lang.Object getVariable(java.lang.String key)
OpenExecution
null
will always be null as null keys are not allowed.
getVariable
in interface OpenExecution
public Variable getVariableObject(java.lang.String key)
public boolean hasVariable(java.lang.String key)
OpenExecution
hasVariable
in interface OpenExecution
public java.util.Set<java.lang.String> getVariableKeys()
OpenExecution
getVariableKeys
in interface OpenExecution
public java.util.Map<java.lang.String,java.lang.Object> getVariables()
OpenExecution
getVariables
in interface OpenExecution
public boolean hasVariables()
OpenExecution
hasVariables
in interface OpenExecution
public boolean removeVariable(java.lang.String key)
OpenExecution
removeVariable
in interface OpenExecution
public void removeVariables()
OpenExecution
removeVariables
in interface OpenExecution
protected void initializeTimers(CompositeElementImpl scope)
protected void destroyTimers(CompositeElementImpl scope)
public void createTimer(java.lang.String eventName, java.lang.String signalName, java.lang.String dueDateDescription)
public void createTimer(java.lang.String eventName, java.lang.String signalName, java.lang.String dueDateDescription, java.lang.String repeat)
public void createTimer(java.lang.String eventName, java.lang.String signalName, java.lang.String dueDateDescription, java.util.Date dueDate, java.lang.String repeat, java.lang.Boolean isExclusive, java.lang.Integer retries)
public java.util.Set<Job> getJobs()
OpenExecution
getJobs
in interface OpenExecution
protected TimerImpl instantiateTimer()
public java.lang.String getState()
Execution
getState
in interface Execution
Execution.getState()
public void lock(java.lang.String state)
Execution#lock(String)
public void unlock()
Execution#unlock()
public boolean isActive()
Execution
Execution.isLocked()
.
isActive
in interface Execution
Execution.isActive()
public boolean isLocked()
Execution
locked
? This is the inverse of
Execution.isActive()
.
isLocked
in interface Execution
Execution.isLocked()
public boolean isSuspended()
Execution
isSuspended
in interface Execution
Execution.isSuspended()
public boolean isEnded()
Execution
isEnded
in interface Execution
Execution.isEnded()
public boolean isFinished()
Execution
isFinished
in interface Execution
Execution.isFinished()
protected void checkLock()
public void sendContinuationMessage(AtomicOperation operation)
public void performAtomicOperationSync(AtomicOperation operation)
public void fire(java.lang.String eventName, ObservableElement eventSource)
ActivityExecution
#getEventSource()
, event if the events are
registered to parent's of the given eventSource.
fire
in interface ActivityExecution
fire
in interface EventListenerExecution
Execution#fire(String, ObservableElement)
protected void propagateEvent(java.lang.String eventName, ObservableElement eventSource, ObservableElementImpl observableElement)
public void handleException(ObservableElementImpl observableElement, EventImpl event, EventListenerReference eventListenerReference, java.lang.Exception exception, java.lang.String rethrowMessage)
public Comment createComment(java.lang.String message)
Discussable
createComment
in interface Discussable
public void removeComment(Comment comment)
Discussable
removeComment
in interface Discussable
public void addComment(CommentImpl comment)
public ExecutionImpl createExecution()
ActivityExecution
#createExecution(Execution, String)
for more information.
createExecution
in interface ActivityExecution
Execution#createProcessInstance()
public Execution createExecution(Execution parent)
ActivityExecution
#createExecution(Execution, String)
for more information.
createExecution
in interface ActivityExecution
public Execution createExecution(java.lang.String name, Execution parent)
ActivityExecution
inactivate
the parent execution
automatically.
createExecution
in interface ActivityExecution
public ExecutionImpl createExecution(java.lang.String name)
ActivityExecution
#createExecution(Execution, String)
for more information.
createExecution
in interface ActivityExecution
Execution#createProcessInstance(String)
protected ExecutionImpl newChildExecution()
public void addExecution(Execution execution)
public ExecutionImpl getExecution(java.lang.String name)
OpenExecution
getExecution
in interface OpenExecution
Execution#getExecution(String)
public void removeExecution(Execution child)
ActivityExecution
active
.
removeExecution
in interface ActivityExecution
public void removeExecution(Execution child, Execution parent)
ActivityExecution
active
.
removeExecution
in interface ActivityExecution
public java.util.Map<java.lang.String,OpenExecution> getExecutionsMap()
OpenExecution
getExecutionsMap
in interface OpenExecution
public boolean hasExecution(java.lang.String name)
OpenExecution
hasExecution
in interface OpenExecution
public ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition)
ActivityExecution
PvmDbSession
in the Environment
.
createSubProcessInstance
in interface ActivityExecution
public ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition, java.lang.String key)
ActivityExecution
PvmDbSession
in the Environment
.
createSubProcessInstance
in interface ActivityExecution
public ClientProcessInstance beginSubProcessInstance(ClientProcessDefinition processDefinition)
ActivityExecution
PvmDbSession
in the
Environment
.
beginSubProcessInstance
in interface ActivityExecution
public ClientProcessInstance beginSubProcessInstance(ClientProcessDefinition processDefinition, java.lang.String key)
ActivityExecution
PvmDbSession
in the
Environment
.
beginSubProcessInstance
in interface ActivityExecution
public java.lang.String getNodeName()
Execution
getNodeName
in interface Execution
public void addLog(ProcessLog processLog)
ActivityExecution
addLog
in interface ActivityExecution
addLog
in interface EventListenerExecution
public int nextLogIndex()
protected TransitionImpl findTransition(java.lang.String transitionName)
NodeImpl.findOutgoingTransition(String)
to
search for the outgoing transition, which includes a search over the parent
chain of the current node. This method allows process languages to
overwrite this default implementation of the transition lookup by
transitionName.
protected TransitionImpl findDefaultTransition()
public <T> T getExtension(java.lang.Class<T> extensionClass)
ActivityExecution
getExtension
in interface ActivityExecution
getExtension
in interface EventListenerExecution
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.util.List<Comment> getComments()
Discussable
getComments
in interface Discussable
public Event getEvent()
EventListenerExecution
getEvent
in interface EventListenerExecution
public ObservableElement getEventSource()
EventListenerExecution
Activity
, but the
eventSource can also be a child of the object to which is listened in case
of event propagation.
getEventSource
in interface EventListenerExecution
public java.util.Collection<OpenExecution> getExecutions()
OpenExecution
getExecutions
in interface OpenExecution
public java.lang.String getName()
Execution
getName
in interface Execution
public ExecutionImpl getParent()
OpenExecution
getParent
in interface OpenExecution
public int getPriority()
Execution
getPriority
in interface Execution
public PVMProcessDefinitionImpl getProcessDefinition()
OpenExecution
getProcessDefinition
in interface OpenExecution
public TransitionImpl getTransition()
ActivityExecution
getTransition
in interface ActivityExecution
getTransition
in interface EventListenerExecution
public void setEvent(EventImpl event)
public void setEventSource(ObservableElementImpl eventSource)
public void setPriority(int priority)
ActivityExecution
setPriority
in interface ActivityExecution
setPriority
in interface EventListenerExecution
setPriority
in interface OpenExecution
public void setTransition(TransitionImpl transition)
public Node getPreviousNode()
ActivityExecution
Node.isPreviousNeeded()
is set to true.
getPreviousNode
in interface ActivityExecution
public Transition getPreviousTransition()
ActivityExecution
Node.isPreviousNeeded()
is set to true.
getPreviousTransition
in interface ActivityExecution
public ExecutionImpl getProcessInstance()
OpenExecution
getProcessInstance
in interface OpenExecution
public void setProcessInstance(ExecutionImpl processInstance)
public void setComments(java.util.Set<CommentImpl> comments)
public NodeImpl getTransitionOrigin()
public void setTransitionOrigin(NodeImpl transitionOrigin)
public java.lang.Exception getException()
EventListenerExecution
getException
in interface EventListenerExecution
public void setException(java.lang.Exception exception)
public ProcessModificationsImpl getProcessModifications()
public void setProcessModifications(ProcessModificationsImpl processModifications)
public java.lang.String getKey()
Execution
getKey
in interface Execution
public ExecutionImpl.Propagation getPropagation()
public void setPropagation(ExecutionImpl.Propagation propagation)
public void setName(java.lang.String name)
public void setState(java.lang.String state)
public void setExecutions(java.util.Collection<ExecutionImpl> executions)
public void setParent(ExecutionImpl parent)
public void setPreviousNode(Node previousNode)
public void setPreviousTransition(Transition previousTransition)
public void setProcessDefinition(PVMProcessDefinitionImpl processDefinition)
public ExecutionImpl getSuperProcessExecution()
public void setSuperProcessExecution(ExecutionImpl superProcessExecution)
public ExecutionImpl getSubProcessInstance()
OpenExecution
getSubProcessInstance
in interface OpenExecution
public void setSubProcessInstance(ExecutionImpl subProcessExecution)
public NodeImpl getNode()
OpenExecution
getNode
in interface OpenExecution
public void setNode(NodeImpl node)
public long getDbid()
getDbid
in interface Execution
public void setKey(java.lang.String key)
public java.lang.String getId()
Execution
getId
in interface Execution
public void setId(java.lang.String id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |