|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 (i.e. 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)
|
void |
forceUnlock()
force unlocking the token, even if the owner is not known. |
void |
foreUnlock()
Deprecated. Use forceUnlock() instead |
java.util.Map |
getActiveChildren()
|
java.util.Set |
getAvailableTransitions()
a set of all the leaving transitions on the current node for which the condition expression resolves to true. |
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 |
getLockOwner()
return the current lock owner of the token |
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()
|
int |
hashCode()
|
boolean |
hasParent()
|
boolean |
isAbleToReactivateParent()
|
boolean |
isLocked()
|
boolean |
isRoot()
|
boolean |
isSuspended()
|
boolean |
isTerminatedImplicitly()
|
boolean |
isTerminationImplicit()
|
void |
lock(java.lang.String lockOwner)
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()
sends a signal to this token. leaves the current node over the default
transition. |
void |
signal(java.lang.String transitionName)
sends a signal to this token. leaves the current node over the
transition with the given name. |
void |
signal(Transition transition)
sends a signal to this token. leaves the current node over the given
transition. |
void |
startCompositeLog(CompositeLog compositeLog)
convenience method for starting a composite log. |
void |
suspend()
suspends a process execution. |
java.lang.String |
toString()
|
void |
unlock(java.lang.String lockOwner)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, 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()
node over the default
transition.
public void signal(java.lang.String transitionName)
node over the
transition with the given name.
public void signal(Transition transition)
node over the given
transition.
public java.util.Set getAvailableTransitions()
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 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.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic ProcessInstance createSubProcessInstance(ProcessDefinition subProcessDefinition)
public void lock(java.lang.String lockOwner)
unlock(String)public void unlock(java.lang.String lockOwner)
lock(String)public void foreUnlock()
forceUnlock() instead
public void forceUnlock()
public java.lang.String getLockOwner()
public boolean isLocked()
public long getId()
getId in interface Identifiablepublic 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 | |||||||||