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

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


org.jbpm.graph.def
Class Node

java.lang.Object
  extended byorg.jbpm.graph.def.GraphElement
      extended byorg.jbpm.graph.def.Node
All Implemented Interfaces:
Parsable, java.io.Serializable
Direct Known Subclasses:
Decision, EndState, Fork, InterleaveEnd, InterleaveStart, Join, Merge, MilestoneNode, ParallelSplit, ProcessState, StartState, State, SuperState, TaskNode

public class Node
extends GraphElement
implements Parsable

See Also:
Serialized Form

Field Summary
protected  Action action
           
protected  java.util.Set arrivingTransitions
           
protected  java.util.List leavingTransitions
           
protected  SuperState superState
           
static java.lang.String[] supportedEventTypes
           
 
Fields inherited from class org.jbpm.graph.def.GraphElement
events, exceptionHandlers, name, processDefinition
 
Constructor Summary
Node()
          creates an unnamed node.
Node(java.lang.String name)
          creates a node with the given name.
 
Method Summary
 Transition addArrivingTransition(Transition arrivingTransition)
          add a bidirection relation between this node and the given arriving transition.
 Transition addLeavingTransition(Transition leavingTransition)
          creates a bidirection relation between this node and the given leaving transition.
 void enter(ExecutionContext executionContext)
          called by a transition to pass execution to this node.
 void execute(ExecutionContext executionContext)
          override this method to customize the node behaviour.
 java.lang.String generateNextLeavingTransitionName()
          generates a new name for a transition that will be added as a leaving transition.
 Action getAction()
           
 java.util.Set getArrivingTransitions()
          are the arriving transitions.
 Transition getDefaultLeavingTransition()
          is the default leaving transition.
 java.lang.String getFullyQualifiedName()
          the slash separated name that includes all the superstate names.
 Transition getLeavingTransition(java.lang.String transitionName)
          retrieves a leaving transition by name.
 java.util.List getLeavingTransitions()
           
 java.util.List getLeavingTransitionsList()
           
 java.util.Map getLeavingTransitionsMap()
          are the leaving Transitions, mapped by their name (java.lang.String).
 GraphElement getParent()
          is the SuperState or the ProcessDefinition in which this node is contained.
 ProcessDefinition getProcessDefinition()
           
 SuperState getSuperState()
           
 java.lang.String[] getSupportedEventTypes()
          indicative set of event types supported by this graph element.
 boolean hasLeavingTransition(java.lang.String transitionName)
          checks for the presence of a leaving transition with the given name.
 boolean hasNoLeavingTransitions()
          true if this transition has leaving transitions.
 void leave(ExecutionContext executionContext)
          called by the implementation of this node to continue execution over the default transition.
 void leave(ExecutionContext executionContext, java.lang.String transitionName)
          called by the implementation of this node to continue execution over the specified transition.
 void leave(ExecutionContext executionContext, Transition transition)
          called by the implementation of this node to continue execution over the given transition.
 void read(org.dom4j.Element nodeElement, JpdlXmlReader jpdlXmlReader)
           
 void removeArrivingTransition(Transition arrivingTransition)
          removes the bidirection relation between this node and the given arriving transition.
 void removeLeavingTransition(Transition leavingTransition)
          removes the bidirection relation between this node and the given leaving transition.
 void reorderLeavingTransition(int oldIndex, int newIndex)
          moves one leaving transition from the oldIndex and inserts it at the newIndex.
 void setAction(Action action)
           
 void setName(java.lang.String name)
          updates the name of this node
 void write(org.dom4j.Element nodeElement)
           
 
Methods inherited from class org.jbpm.graph.def.GraphElement
addEvent, addExceptionHandler, findExceptionHandler, fireAndPropagateEvent, fireEvent, getEvent, getEvents, getExceptionHandlers, getId, getName, getParentChain, getParents, hasEvent, hasEvents, raiseException, removeEvent, removeExceptionHandler, reorderExceptionHandler, setProcessDefinition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

leavingTransitions

protected java.util.List leavingTransitions

arrivingTransitions

protected java.util.Set arrivingTransitions

action

protected Action action

superState

protected SuperState superState

supportedEventTypes

public static final java.lang.String[] supportedEventTypes
Constructor Detail

Node

public Node()
creates an unnamed node.


Node

public Node(java.lang.String name)
creates a node with the given name.

Method Detail

getSupportedEventTypes

public java.lang.String[] getSupportedEventTypes()
Description copied from class: GraphElement
indicative set of event types supported by this graph element. this is currently only used by the process designer to know which event types to show on a given graph element. in process definitions and at runtime, there are no contstraints on the event-types.

Specified by:
getSupportedEventTypes in class GraphElement

read

public void read(org.dom4j.Element nodeElement,
                 JpdlXmlReader jpdlXmlReader)
Specified by:
read in interface Parsable

write

public void write(org.dom4j.Element nodeElement)
Specified by:
write in interface Parsable

getLeavingTransitions

public java.util.List getLeavingTransitions()

getLeavingTransitionsMap

public java.util.Map getLeavingTransitionsMap()
are the leaving Transitions, mapped by their name (java.lang.String).


addLeavingTransition

public Transition addLeavingTransition(Transition leavingTransition)
creates a bidirection relation between this node and the given leaving transition.

Throws:
java.lang.IllegalArgumentException - if leavingTransition is null.

removeLeavingTransition

public void removeLeavingTransition(Transition leavingTransition)
removes the bidirection relation between this node and the given leaving transition.

Throws:
java.lang.IllegalArgumentException - if leavingTransition is null.

hasLeavingTransition

public boolean hasLeavingTransition(java.lang.String transitionName)
checks for the presence of a leaving transition with the given name.

Returns:
true if this node has a leaving transition with the given name, false otherwise.

getLeavingTransition

public Transition getLeavingTransition(java.lang.String transitionName)
retrieves a leaving transition by name. note that also the leaving transitions of the supernode are taken into account.


hasNoLeavingTransitions

public boolean hasNoLeavingTransitions()
true if this transition has leaving transitions.


generateNextLeavingTransitionName

public java.lang.String generateNextLeavingTransitionName()
generates a new name for a transition that will be added as a leaving transition.


getDefaultLeavingTransition

public Transition getDefaultLeavingTransition()
is the default leaving transition.


reorderLeavingTransition

public void reorderLeavingTransition(int oldIndex,
                                     int newIndex)
moves one leaving transition from the oldIndex and inserts it at the newIndex.


getLeavingTransitionsList

public java.util.List getLeavingTransitionsList()

getArrivingTransitions

public java.util.Set getArrivingTransitions()
are the arriving transitions.


addArrivingTransition

public Transition addArrivingTransition(Transition arrivingTransition)
add a bidirection relation between this node and the given arriving transition.

Throws:
java.lang.IllegalArgumentException - if t is null.

removeArrivingTransition

public void removeArrivingTransition(Transition arrivingTransition)
removes the bidirection relation between this node and the given arriving transition.

Throws:
java.lang.IllegalArgumentException - if t is null.

getParent

public GraphElement getParent()
is the SuperState or the ProcessDefinition in which this node is contained.

Overrides:
getParent in class GraphElement

enter

public void enter(ExecutionContext executionContext)
called by a transition to pass execution to this node.


execute

public void execute(ExecutionContext executionContext)
override this method to customize the node behaviour.


leave

public void leave(ExecutionContext executionContext)
called by the implementation of this node to continue execution over the default transition.


leave

public void leave(ExecutionContext executionContext,
                  java.lang.String transitionName)
called by the implementation of this node to continue execution over the specified transition.


leave

public void leave(ExecutionContext executionContext,
                  Transition transition)
called by the implementation of this node to continue execution over the given transition.


getProcessDefinition

public ProcessDefinition getProcessDefinition()
Overrides:
getProcessDefinition in class GraphElement

setName

public void setName(java.lang.String name)
updates the name of this node

Overrides:
setName in class GraphElement

getFullyQualifiedName

public java.lang.String getFullyQualifiedName()
the slash separated name that includes all the superstate names.


getSuperState

public SuperState getSuperState()

getAction

public Action getAction()

setAction

public void setAction(Action action)


Version : jbpm-3.0.4