站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss JBPM 3.0.4 API 英文版文档

Token (jbpm-3.0.4) - JBoss JBPM 3.0.4 API 英文版文档


org.jbpm.graph.exe
Class Token

java.lang.Object
  extended byorg.jbpm.graph.exe.Token
All Implemented Interfaces:
java.io.Serializable

public class Token
extends java.lang.Object
implements java.io.Serializable

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).

See Also:
Serialized Form

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 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.
 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 isTerminatedImplicitly()
           
 boolean isTerminationImplicit()
           
 int nextLogIndex()
           
 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.
 void signal(java.lang.String transitionName)
          provides a signal to the token.
 void signal(Transition transition)
          provides a signal to the token.
 void startCompositeLog(CompositeLog compositeLog)
          convenience method for starting a composite log.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

start

protected java.util.Date start

end

protected java.util.Date end

node

protected Node node

nodeEnter

protected java.util.Date nodeEnter

processInstance

protected ProcessInstance processInstance

parent

protected Token parent

children

protected java.util.Map children

comments

protected java.util.List comments

subProcessInstance

protected ProcessInstance subProcessInstance

nextLogIndex

protected int nextLogIndex
Constructor Detail

Token

public Token()

Token

public Token(ProcessInstance processInstance)
creates a root token.


Token

public Token(Token parent,
             java.lang.String name)
creates a child token.

Method Detail

signal

public void signal()
provides a signal to the token. this method activates this token and leaves the current state over the default transition.


signal

public void signal(java.lang.String transitionName)
provides a signal to the token. this leave the current state over the given transition name.


signal

public void signal(Transition transition)
provides a signal to the token. this leave the current state over the given transition name.


end

public 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.


end

public void end(boolean verifyParentTermination)
ends this token with optional parent ending verification.

Parameters:
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.

addComment

public void addComment(java.lang.String message)

addComment

public void addComment(Comment comment)

getComments

public java.util.List getComments()

hasActiveChildren

public boolean hasActiveChildren()
tells if this token has child tokens that have not yet ended.


addLog

public void addLog(ProcessLog processLog)
convenience method for adding a process log.


startCompositeLog

public void startCompositeLog(CompositeLog compositeLog)
convenience method for starting a composite log. When you add composite logs, make sure you put the endCompositeLog() in a finally block.


endCompositeLog

public void endCompositeLog()
convenience method for ending a composite log. Make sure you put this in a finally block.


toString

public java.lang.String toString()

hasEnded

public boolean hasEnded()

isRoot

public boolean isRoot()

hasParent

public boolean hasParent()

hasChild

public boolean hasChild(java.lang.String name)

getChild

public Token getChild(java.lang.String name)

getFullName

public java.lang.String getFullName()

getChildrenAtNode

public java.util.List getChildrenAtNode(Node aNode)

findToken

public Token findToken(java.lang.String relativeTokenPath)

getActiveChildren

public java.util.Map getActiveChildren()

checkImplicitTermination

public void checkImplicitTermination()

isTerminatedImplicitly

public boolean isTerminatedImplicitly()

nextLogIndex

public int nextLogIndex()

getId

public long getId()

getStart

public java.util.Date getStart()

getEnd

public java.util.Date getEnd()

getName

public java.lang.String getName()

getProcessInstance

public ProcessInstance getProcessInstance()

getChildren

public java.util.Map getChildren()

getNode

public Node getNode()

setNode

public void setNode(Node node)

getParent

public Token getParent()

setParent

public void setParent(Token parent)

setProcessInstance

public void setProcessInstance(ProcessInstance processInstance)

getSubProcessInstance

public ProcessInstance getSubProcessInstance()

setSubProcessInstance

public void setSubProcessInstance(ProcessInstance subProcessInstance)

getNodeEnter

public java.util.Date getNodeEnter()

setNodeEnter

public void setNodeEnter(java.util.Date nodeEnter)

isAbleToReactivateParent

public boolean isAbleToReactivateParent()

setAbleToReactivateParent

public void setAbleToReactivateParent(boolean isAbleToReactivateParent)

isTerminationImplicit

public boolean isTerminationImplicit()

setTerminationImplicit

public void setTerminationImplicit(boolean isTerminationImplicit)


Version : jbpm-3.0.4