|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbpm.graph.exe.Token
public class Token
represents one path of execution and maintains a pointer to a node
in the ProcessDefinition
. Most common
way to get a hold of the token objects is with ProcessInstance.getRootToken()
or ProcessInstance.findToken(String)
.
Field Summary | |
---|---|
protected java.util.Map |
children
|
protected java.util.List |
comments
|
protected java.util.Date |
end
|
protected java.lang.String |
name
|
protected int |
nextLogIndex
|
protected Node |
node
|
protected java.util.Date |
nodeEnter
|
protected Token |
parent
|
protected ProcessInstance |
processInstance
|
protected java.util.Date |
start
|
protected ProcessInstance |
subProcessInstance
|
Constructor Summary | |
---|---|
Token()
|
|
Token(ProcessInstance processInstance)
creates a root token. |
|
Token(Token parent,
java.lang.String name)
creates a child token. |
Method Summary | |
---|---|
void |
addComment(Comment comment)
|
void |
addComment(java.lang.String message)
|
void |
addLog(ProcessLog processLog)
convenience method for adding a process log. |
void |
checkImplicitTermination()
|
void |
collectChildrenRecursively(java.util.List tokens)
|
ProcessInstance |
createSubProcessInstance(ProcessDefinition subProcessDefinition)
|
void |
end()
ends this token and all of its children (if any). this is the last active (=not-ended) child of a parent token, the parent token will be ended as well and that verification will continue to propagate. |
void |
end(boolean verifyParentTermination)
ends this token with optional parent ending verification. |
void |
endCompositeLog()
convenience method for ending a composite log. |
boolean |
equals(java.lang.Object o)
|
Token |
findToken(java.lang.String relativeTokenPath)
|
java.util.Map |
getActiveChildren()
|
Token |
getChild(java.lang.String name)
|
java.util.Map |
getChildren()
|
java.util.List |
getChildrenAtNode(Node aNode)
|
java.util.List |
getComments()
|
java.util.Date |
getEnd()
|
java.lang.String |
getFullName()
|
long |
getId()
|
java.lang.String |
getName()
|
Node |
getNode()
|
java.util.Date |
getNodeEnter()
|
Token |
getParent()
|
ProcessInstance |
getProcessInstance()
|
java.util.Date |
getStart()
|
ProcessInstance |
getSubProcessInstance()
|
boolean |
hasActiveChildren()
tells if this token has child tokens that have not yet ended. |
boolean |
hasChild(java.lang.String name)
|
boolean |
hasEnded()
|
boolean |
hasParent()
|
boolean |
isAbleToReactivateParent()
|
boolean |
isRoot()
|
boolean |
isSuspended()
|
boolean |
isTerminatedImplicitly()
|
boolean |
isTerminationImplicit()
|
void |
lock()
locks a process instance for further execution. |
int |
nextLogIndex()
|
void |
resume()
resumes a process execution. |
void |
setAbleToReactivateParent(boolean isAbleToReactivateParent)
|
void |
setNode(Node node)
|
void |
setNodeEnter(java.util.Date nodeEnter)
|
void |
setParent(Token parent)
|
void |
setProcessInstance(ProcessInstance processInstance)
|
void |
setSubProcessInstance(ProcessInstance subProcessInstance)
|
void |
setTerminationImplicit(boolean isTerminationImplicit)
|
void |
signal()
provides a signal to the token. this method activates this token and leaves the current state over the default transition. |
void |
signal(java.lang.String transitionName)
provides a signal to the token. this leave the current state over the given transition name. |
void |
signal(Transition transition)
provides a signal to the token. this leave the current state over the given transition name. |
void |
startCompositeLog(CompositeLog compositeLog)
convenience method for starting a composite log. |
void |
suspend()
suspends a process execution. |
java.lang.String |
toString()
|
void |
unlock()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.util.Date start
protected java.util.Date end
protected Node node
protected java.util.Date nodeEnter
protected ProcessInstance processInstance
protected Token parent
protected java.util.Map children
protected java.util.List comments
protected ProcessInstance subProcessInstance
protected int nextLogIndex
Constructor Detail |
---|
public Token()
public Token(ProcessInstance processInstance)
public Token(Token parent, java.lang.String name)
Method Detail |
---|
public void signal()
public void signal(java.lang.String transitionName)
public void signal(Transition transition)
public void end()
public void end(boolean verifyParentTermination)
verifyParentTermination
- specifies if the parent token should be checked for termination.
if verifyParentTermination is set to true and this is the last non-ended child of a parent token,
the parent token will be ended as well and the verification will continue to propagate.public void addComment(java.lang.String message)
public void addComment(Comment comment)
public java.util.List getComments()
public boolean hasActiveChildren()
public void addLog(ProcessLog processLog)
public void startCompositeLog(CompositeLog compositeLog)
endCompositeLog()
in a finally block.
public void endCompositeLog()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean hasEnded()
public boolean isRoot()
public boolean hasParent()
public boolean hasChild(java.lang.String name)
public Token getChild(java.lang.String name)
public java.lang.String getFullName()
public java.util.List getChildrenAtNode(Node aNode)
public void collectChildrenRecursively(java.util.List tokens)
public Token findToken(java.lang.String relativeTokenPath)
public java.util.Map getActiveChildren()
public void checkImplicitTermination()
public boolean isTerminatedImplicitly()
public int nextLogIndex()
public void suspend()
public void resume()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public ProcessInstance createSubProcessInstance(ProcessDefinition subProcessDefinition)
public void lock()
public void unlock()
lock()
public long getId()
public java.util.Date getStart()
public java.util.Date getEnd()
public java.lang.String getName()
public ProcessInstance getProcessInstance()
public java.util.Map getChildren()
public Node getNode()
public void setNode(Node node)
public Token getParent()
public void setParent(Token parent)
public void setProcessInstance(ProcessInstance processInstance)
public ProcessInstance getSubProcessInstance()
public java.util.Date getNodeEnter()
public void setNodeEnter(java.util.Date nodeEnter)
public boolean isAbleToReactivateParent()
public void setAbleToReactivateParent(boolean isAbleToReactivateParent)
public boolean isTerminationImplicit()
public void setTerminationImplicit(boolean isTerminationImplicit)
public boolean isSuspended()
public void setSubProcessInstance(ProcessInstance subProcessInstance)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |