|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbpm.graph.exe.ProcessInstance
public class ProcessInstance
is one execution of a ProcessDefinition
.
To create a new process execution of a process definition, just use the
ProcessInstance(ProcessDefinition)
.
Field Summary | |
---|---|
protected java.util.List |
cascadeProcessInstances
not persisted |
protected java.util.Date |
end
|
protected java.util.Map |
instances
|
protected boolean |
isSuspended
|
protected ProcessDefinition |
processDefinition
|
protected Token |
rootToken
|
protected java.util.List |
runtimeActions
|
protected java.util.Date |
start
|
protected Token |
superProcessToken
|
protected java.util.Map |
transientInstances
|
Constructor Summary | |
---|---|
ProcessInstance()
|
|
ProcessInstance(ProcessDefinition processDefinition)
creates a new process instance for the given process definition and puts the root-token (=main path of execution) in the start state. |
Method Summary | |
---|---|
ModuleInstance |
addInstance(ModuleInstance moduleInstance)
adds the given optional moduleinstance (bidirectional). |
RuntimeAction |
addRuntimeAction(RuntimeAction runtimeAction)
adds an action to be executed upon a process event in the future. |
void |
end()
ends (=cancels) this process instance and all the tokens in it. |
void |
end(boolean reactivateSuper)
|
boolean |
equals(java.lang.Object o)
|
java.util.List |
findAllTokens()
collects all instances for this process instance. |
Token |
findToken(java.lang.String tokenPath)
looks up the token in the tree, specified by the slash-separated token path. |
ContextInstance |
getContextInstance()
process instance extension for process variableInstances. |
java.util.Date |
getEnd()
|
long |
getId()
|
ModuleInstance |
getInstance(java.lang.Class clazz)
looks up an optional module instance by its class. |
java.util.Map |
getInstances()
|
LoggingInstance |
getLoggingInstance()
process instance extension for logging. |
ProcessDefinition |
getProcessDefinition()
|
Token |
getRootToken()
|
java.util.List |
getRuntimeActions()
is the list of all runtime actions. |
java.util.Date |
getStart()
|
Token |
getSuperProcessToken()
|
TaskMgmtInstance |
getTaskMgmtInstance()
process instance extension for managing the tasks and actors. |
int |
getVersion()
|
boolean |
hasEnded()
tells if this process instance is still active or not. |
boolean |
isSuspended()
|
boolean |
isTerminatedImplicitly()
calculates if this process instance has still options to continue. |
java.util.Collection |
removeCascadeProcessInstances()
|
ModuleInstance |
removeInstance(ModuleInstance moduleInstance)
removes the given optional moduleinstance (bidirectional). |
RuntimeAction |
removeRuntimeAction(RuntimeAction runtimeAction)
removes a runtime action. |
void |
resume()
resumes a suspended execution. |
void |
setEnd(java.util.Date end)
|
void |
setProcessDefinition(ProcessDefinition processDefinition)
|
void |
setRootToken(Token rootToken)
|
void |
setStart(java.util.Date start)
|
void |
setSuperProcessToken(Token superProcessToken)
|
void |
setVersion(int version)
|
void |
signal()
instructs the main path of execution to continue by taking the default transition on the current node. |
void |
signal(java.lang.String transitionName)
instructs the main path of execution to continue by taking the specified transition on the current node. |
void |
signal(Transition transition)
instructs the main path of execution to continue by taking the specified transition on the current node. |
void |
suspend()
suspends this execution. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Date start
protected java.util.Date end
protected ProcessDefinition processDefinition
protected Token rootToken
protected Token superProcessToken
protected boolean isSuspended
protected java.util.Map instances
protected java.util.Map transientInstances
protected java.util.List runtimeActions
protected java.util.List cascadeProcessInstances
Constructor Detail |
---|
public ProcessInstance()
public ProcessInstance(ProcessDefinition processDefinition)
ProcessDefinition
, the corresponding module instance
will be created.
JbpmException
- if processDefinition is null.Method Detail |
---|
public ModuleInstance addInstance(ModuleInstance moduleInstance)
public ModuleInstance removeInstance(ModuleInstance moduleInstance)
public ModuleInstance getInstance(java.lang.Class clazz)
public ContextInstance getContextInstance()
public TaskMgmtInstance getTaskMgmtInstance()
public LoggingInstance getLoggingInstance()
Token.addLog(ProcessLog)
is
sufficient and more convenient.
public void signal()
java.lang.IllegalStateException
- if the token is not active.public void signal(java.lang.String transitionName)
java.lang.IllegalStateException
- if the token is not active.public void signal(Transition transition)
java.lang.IllegalStateException
- if the token is not active.public void end()
public void end(boolean reactivateSuper)
public void suspend()
resume()
public void resume()
suspend()()
public RuntimeAction addRuntimeAction(RuntimeAction runtimeAction)
public RuntimeAction removeRuntimeAction(RuntimeAction runtimeAction)
public java.util.List getRuntimeActions()
public boolean hasEnded()
public boolean isTerminatedImplicitly()
public Token findToken(java.lang.String tokenPath)
tokenPath
- is a slash-separated name that specifies a token in the tree.
public java.util.List findAllTokens()
public java.util.Collection removeCascadeProcessInstances()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public long getId()
public Token getRootToken()
public java.util.Date getStart()
public java.util.Date getEnd()
public java.util.Map getInstances()
public ProcessDefinition getProcessDefinition()
public Token getSuperProcessToken()
public void setSuperProcessToken(Token superProcessToken)
public boolean isSuspended()
public int getVersion()
public void setVersion(int version)
public void setEnd(java.util.Date end)
public void setProcessDefinition(ProcessDefinition processDefinition)
public void setRootToken(Token rootToken)
public void setStart(java.util.Date start)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |