|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.orchestra.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 boolean |
hasVariables
|
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. typically this is an externally provided reference that is unique within the scope of the process definition. |
protected java.lang.String |
name
an optional name for this execution. can be used to differentiate concurrent paths of execution like e.g. the 'shipping' and 'billing' paths. |
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 ProcessDefinitionImpl |
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.orchestra.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. |
|
ProcessDefinitionImpl |
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 |
|
int |
hashCode()
|
|
boolean |
hasVariable(java.lang.String key)
indicates presenve of the given key. |
|
boolean |
hasVariables()
indicates if there are keys in this scope. |
|
void |
initializeProcessInstance(ProcessDefinitionImpl 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 ? |
|
boolean |
isEnded()
is this execution ended normally ? |
|
boolean |
isFinished()
is this execution ended or cancelled ? |
|
boolean |
isLocked()
is this execution locked ? |
|
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(ProcessDefinitionImpl 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 transitionToTake)
takes the given outgoing transition. |
|
void |
take(Transition transitionToTake,
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, 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
Executionprotected ProcessDefinitionImpl 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 boolean hasVariables
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(ProcessDefinitionImpl processDefinition,
java.lang.String key)
public void begin()
ClientProcessInstance
begin in interface ClientProcessInstanceprotected ExecutionImpl initializeScopes()
public ExecutionImpl createScope(CompositeElementImpl scope)
public ExecutionImpl destroyScope(CompositeElementImpl scope)
public java.lang.String toString()
toString in class java.lang.Objectpublic void end()
ClientExecutionAll child executions will be stopped and removed. This execution will not be removed from its parent.
This method should not be called in Activitys. It can be called
from outside the process execution and in ExternalActivitys.
end in interface ActivityExecutionend in interface ClientExecutionpublic void end(java.lang.String state)
ClientExecution
end in interface ActivityExecutionend in interface ClientExecutionpublic void cancel()
ClientExecutionExecution.STATE_CANCELLED.
cancel in interface ActivityExecutioncancel in interface ClientExecutionClientExecution.end(String)public void suspend()
ClientExecution
suspend in interface ClientExecutionExecution#suspend()public void resume()
ClientExecutionClientExecution.suspend().
resume in interface ClientExecutionExecution#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
org.ow2.orchestra.pvm.activity.ExternalActivity#signal(Execution, String, Map) of the
current node.
signal in interface ClientExecutionClientExecution.signal(String)public void signal(java.lang.String signal)
ClientExecutionexternal 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 ClientExecutionSee the unnamed signal for more informationpublic void signal(java.util.Map<java.lang.String,java.lang.Object> parameters)
ClientExecutionan external trigger into the execution with
parameters.
signal in interface ClientExecutionSee the unnamed signal for more information
public void signal(java.lang.String signal,
java.util.Map<java.lang.String,java.lang.Object> parameters)
ClientExecutionexternal 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
org.ow2.orchestra.pvm.activity.ExternalActivity#signal(Execution, String, Map) for more
information.
signal in interface ClientExecutionSee the unnamed signal for more informationpublic 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
org.ow2.orchestra.pvm.activity.ExternalActivity#signal(Execution, String, Map) of the
current node.
signal in interface ClientExecutionClientExecution.signal(String)
public void signal(java.lang.String signalName,
Execution execution)
ClientExecutionexternal 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 ClientExecutionSee the unnamed signal for more information
public void signal(java.util.Map<java.lang.String,java.lang.Object> parameters,
Execution execution)
ClientExecutionan external trigger into a given execution with
parameters.
signal in interface ClientExecutionSee 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)
ClientExecutionexternal 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
org.ow2.orchestra.pvm.activity.ExternalActivity#signal(Execution, String, Map) for more
information.
signal in interface ClientExecutionSee the unnamed signal for more informationpublic 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 ActivityExecutionExecution#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 ActivityExecutiontransitionName - is the name of the transition to take. A null value will match the
first unnamed transition.Execution#take(String)public void take(Transition transitionToTake)
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 ActivityExecutionExecution#takeDefaultTransition()
public void take(Transition transitionToTake,
Execution execution)
ActivityExecution
take in interface ActivityExecutionpublic void execute(java.lang.String nodeName)
ActivityExecutionThe 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 ActivityExecutionExecution#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 ActivityExecutionExecution#execute(Node)public void waitForSignal()
ActivityExecution#signal() methods.
waitForSignal in interface ActivityExecutionpublic void proceed()
public void move(Node destination,
Execution execution)
ActivityExecution
move in interface ActivityExecutionpublic void move(Node destination)
ActivityExecution
move in interface ActivityExecutionpublic 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 OpenExecutionpublic void setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
OpenExecutionsets all given variables. Existing
key-value pairs for which there is no key in the provided variables will
not be removed.
setVariables in interface OpenExecutionpublic java.lang.Object getVariable(java.lang.String key)
OpenExecutionnull will always be null as null keys are not allowed.
getVariable in interface OpenExecutionpublic Variable getVariableObject(java.lang.String key)
public boolean hasVariable(java.lang.String key)
OpenExecution
hasVariable in interface OpenExecutionpublic java.util.Set<java.lang.String> getVariableKeys()
OpenExecution
getVariableKeys in interface OpenExecutionpublic java.util.Map<java.lang.String,java.lang.Object> getVariables()
OpenExecution
getVariables in interface OpenExecutionpublic boolean hasVariables()
OpenExecution
hasVariables in interface OpenExecutionpublic boolean removeVariable(java.lang.String key)
OpenExecution
removeVariable in interface OpenExecutionpublic void removeVariables()
OpenExecution
removeVariables in interface OpenExecutionprotected 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 OpenExecutionprotected TimerImpl instantiateTimer()
public java.lang.String getState()
Execution
getState in interface ExecutionExecution.getState()public void lock(java.lang.String state)
Execution#lock(String)public void unlock()
Execution#unlock()public boolean isActive()
ExecutionExecution.isLocked().
isActive in interface ExecutionExecution.isActive()public boolean isLocked()
Executionlocked ? This is the inverse of
Execution.isActive().
isLocked in interface ExecutionExecution.isLocked()public boolean isSuspended()
Execution
isSuspended in interface ExecutionExecution.isSuspended()public boolean isEnded()
Execution
isEnded in interface ExecutionExecution.isEnded()public boolean isFinished()
Execution
isFinished in interface ExecutionExecution.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 ActivityExecutionfire in interface EventListenerExecutionExecution#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 Discussablepublic void removeComment(Comment comment)
Discussable
removeComment in interface Discussablepublic void addComment(CommentImpl comment)
public ExecutionImpl createExecution()
ActivityExecution#createExecution(Execution, String)
for more information.
createExecution in interface ActivityExecutionExecution#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)
ActivityExecutioninactivate the parent execution
automatically.
createExecution in interface ActivityExecutionpublic ExecutionImpl createExecution(java.lang.String name)
ActivityExecution#createExecution(Execution, String) for more information.
createExecution in interface ActivityExecutionExecution#createProcessInstance(String)protected ExecutionImpl newChildExecution()
public void addExecution(Execution execution)
public ExecutionImpl getExecution(java.lang.String name)
OpenExecution
getExecution in interface OpenExecutionExecution#getExecution(String)public void removeExecution(Execution child)
ActivityExecutionactive.
removeExecution in interface ActivityExecution
public void removeExecution(Execution child,
Execution parent)
ActivityExecutionactive.
removeExecution in interface ActivityExecutionpublic java.util.Map<java.lang.String,OpenExecution> getExecutionsMap()
OpenExecution
getExecutionsMap in interface OpenExecutionpublic boolean hasExecution(java.lang.String name)
OpenExecution
hasExecution in interface OpenExecutionpublic ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition)
ActivityExecutionPvmDbSession
in the Environment.
createSubProcessInstance in interface ActivityExecution
public ClientProcessInstance createSubProcessInstance(ClientProcessDefinition processDefinition,
java.lang.String key)
ActivityExecutionPvmDbSession
in the Environment.
createSubProcessInstance in interface ActivityExecutionpublic ClientProcessInstance beginSubProcessInstance(ClientProcessDefinition processDefinition)
ActivityExecutionPvmDbSession
in the Environment.
beginSubProcessInstance in interface ActivityExecution
public ClientProcessInstance beginSubProcessInstance(ClientProcessDefinition processDefinition,
java.lang.String key)
ActivityExecutionPvmDbSession in the
Environment.
beginSubProcessInstance in interface ActivityExecutionpublic java.lang.String getNodeName()
Execution
getNodeName in interface Executionpublic void addLog(ProcessLog processLog)
ActivityExecution
addLog in interface ActivityExecutionaddLog in interface EventListenerExecutionpublic 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 ActivityExecutiongetExtension in interface EventListenerExecutionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.List<Comment> getComments()
Discussable
getComments in interface Discussablepublic Event getEvent()
EventListenerExecution
getEvent in interface EventListenerExecutionpublic ObservableElement getEventSource()
EventListenerExecutionActivity, but the
eventSource can also be a child of the object to which is listened in case
of event propagation.
getEventSource in interface EventListenerExecutionpublic java.util.Collection<OpenExecution> getExecutions()
OpenExecution
getExecutions in interface OpenExecutionpublic java.lang.String getName()
Execution
getName in interface Executionpublic ExecutionImpl getParent()
OpenExecution
getParent in interface OpenExecutionpublic int getPriority()
Execution
getPriority in interface Executionpublic ProcessDefinitionImpl getProcessDefinition()
OpenExecution
getProcessDefinition in interface OpenExecutionpublic TransitionImpl getTransition()
ActivityExecution
getTransition in interface ActivityExecutiongetTransition in interface EventListenerExecutionpublic void setEvent(EventImpl event)
public void setEventSource(ObservableElementImpl eventSource)
public void setPriority(int priority)
OpenExecution
setPriority in interface ActivityExecutionsetPriority in interface EventListenerExecutionsetPriority in interface OpenExecutionpublic void setTransition(TransitionImpl transition)
public Node getPreviousNode()
ActivityExecutionNode.isPreviousNeeded() is set to true.
getPreviousNode in interface ActivityExecutionpublic Transition getPreviousTransition()
ActivityExecutionNode.isPreviousNeeded() is set to true.
getPreviousTransition in interface ActivityExecutionpublic ExecutionImpl getProcessInstance()
OpenExecution
getProcessInstance in interface OpenExecutionpublic 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 EventListenerExecutionpublic void setException(java.lang.Exception exception)
public ProcessModificationsImpl getProcessModifications()
public void setProcessModifications(ProcessModificationsImpl processModifications)
public java.lang.String getKey()
Execution
getKey in interface Executionpublic 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(ProcessDefinitionImpl processDefinition)
public ExecutionImpl getSuperProcessExecution()
public void setSuperProcessExecution(ExecutionImpl superProcessExecution)
public ExecutionImpl getSubProcessInstance()
OpenExecution
getSubProcessInstance in interface OpenExecutionpublic void setSubProcessInstance(ExecutionImpl subProcessExecution)
public NodeImpl getNode()
OpenExecution
getNode in interface OpenExecutionpublic void setNode(NodeImpl node)
public long getDbid()
getDbid in interface Executionpublic void setKey(java.lang.String key)
public java.lang.String getId()
Execution
getId in interface Executionpublic void setId(java.lang.String id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||