|
||||||||||
| 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 Map |
children
|
protected List |
comments
|
protected Date |
end
|
protected String |
name
|
protected int |
nextLogIndex
|
protected Node |
node
|
protected Date |
nodeEnter
|
protected Token |
parent
|
protected ProcessInstance |
processInstance
|
protected Date |
start
|
protected ProcessInstance |
subProcessInstance
|
| Constructor Summary | |
|---|---|
Token()
|
|
Token(ProcessInstance processInstance)
creates a root token. |
|
Token(Token parent,
String name)
creates a child token. |
|
| Method Summary | |
|---|---|
void |
addComment(Comment comment)
|
void |
addComment(String message)
|
void |
addLog(ProcessLog processLog)
convenience method for adding a process log. |
void |
checkImplicitTermination()
|
void |
collectChildrenRecursively(List tokens)
|
ProcessInstance |
createSubProcessInstance(ProcessDefinition subProcessDefinition)
|
void |
end()
ends this token and all of its children (if any). |
void |
end(boolean verifyParentTermination)
ends this token with optional parent ending verification. |
void |
endCompositeLog()
convenience method for ending a composite log. |
boolean |
equals(Object o)
|
Token |
findToken(String relativeTokenPath)
|
void |
forceUnlock()
force unlocking the token, even if the owner is not known. |
void |
foreUnlock()
Deprecated. Use forceUnlock() instead |
Map |
getActiveChildren()
|
Set |
getAvailableTransitions()
a set of all the leaving transitions on the current node for which the condition expression resolves to true. |
Token |
getChild(String name)
|
Map |
getChildren()
|
List |
getChildrenAtNode(Node aNode)
|
List |
getComments()
|
Date |
getEnd()
|
String |
getFullName()
|
long |
getId()
|
String |
getLockOwner()
return the current lock owner of the token |
String |
getName()
|
Node |
getNode()
|
Date |
getNodeEnter()
|
Token |
getParent()
|
ProcessInstance |
getProcessInstance()
|
Date |
getStart()
|
ProcessInstance |
getSubProcessInstance()
|
boolean |
hasActiveChildren()
tells if this token has child tokens that have not yet ended. |
boolean |
hasChild(String name)
|
boolean |
hasEnded()
|
int |
hashCode()
|
boolean |
hasParent()
|
boolean |
isAbleToReactivateParent()
|
boolean |
isLocked()
|
boolean |
isRoot()
|
boolean |
isSuspended()
|
boolean |
isTerminatedImplicitly()
|
boolean |
isTerminationImplicit()
|
void |
lock(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(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. |
void |
signal(String transitionName)
sends a signal to this token. |
void |
signal(Transition transition)
sends a signal to this token. |
void |
startCompositeLog(CompositeLog compositeLog)
convenience method for starting a composite log. |
void |
suspend()
suspends a process execution. |
String |
toString()
|
void |
unlock(String lockOwner)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected Date start
protected Date end
protected Node node
protected Date nodeEnter
protected ProcessInstance processInstance
protected Token parent
protected Map children
protected List comments
protected ProcessInstance subProcessInstance
protected int nextLogIndex
| Constructor Detail |
|---|
public Token()
public Token(ProcessInstance processInstance)
public Token(Token parent,
String name)
| Method Detail |
|---|
public void signal()
node over the default
transition.
public void signal(String transitionName)
node over the
transition with the given name.
public void signal(Transition transition)
node over the given
transition.
public 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(String message)
public void addComment(Comment comment)
public 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(String name)
public Token getChild(String name)
public String getFullName()
public List getChildrenAtNode(Node aNode)
public void collectChildrenRecursively(List tokens)
public Token findToken(String relativeTokenPath)
public Map getActiveChildren()
public void checkImplicitTermination()
public boolean isTerminatedImplicitly()
public int nextLogIndex()
public void suspend()
public void resume()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic ProcessInstance createSubProcessInstance(ProcessDefinition subProcessDefinition)
public void lock(String lockOwner)
unlock(String)public void unlock(String lockOwner)
lock(String)public void foreUnlock()
forceUnlock() instead
public void forceUnlock()
public String getLockOwner()
public boolean isLocked()
public long getId()
getId in interface Identifiablepublic Date getStart()
public Date getEnd()
public String getName()
public ProcessInstance getProcessInstance()
public 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 Date getNodeEnter()
public void setNodeEnter(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 | |||||||||