com.netscape.pm.model
Interface INodeElement

All Superinterfaces:
IPMElement

public interface INodeElement
extends IPMElement

Defines a node element object in the Process Manager engine. An INodeElement object provides the engine with a consistent interface to interact with different types of nodes available to the process designer.

The node object serves as a container for the properties used to describe the node; all of the logic used by the engine (for instance, the steps needed to perform a work item) is contained in another set of classes separate from the node class called the work manager and work performer classes. These classes are not available to the user from the API.

See Also:
IProcessMap, INotification, ITransition

Field Summary
static int EXECUTION_STAGE_COMPLETE
          Node execution stage value for a work item that has successfully completed the verify stage, and is waiting to be completed by the node's work manager.
static int EXECUTION_STAGE_MANAGE
          Node execution stage value for a work item that needs to retry the node manager's manage method.
static int EXECUTION_STAGE_PERFORM
          Node execution stage value for a work item that has successfully completed the manage stage, and is waiting to be performed by the node's work performer.
static int EXECUTION_STAGE_VERIFY
          Node execution stage value for a work item that has successfully completed the perform stage, and is waiting to be verified by the node's work manager.
 
Method Summary
 void addNotification(INotification not)
          Adds a notification to this node.
 void addTransition(ITransition tr)
          Adds a transition to this node.
 INodeElement getExceptionNode()
          Returns the exception node element associated with this node.
 java.lang.String getForkId()
          Returns the node's fork id value.
 java.lang.String getPageDataModel()
          Returns a string (in the format of a JavaScript hashtable definition) of the properties of this node element.
 int getPositionX()
          Returns the x position of this node on the process map.
 int getPositionY()
          Returns the y position of this node on the process map.
 IProcessMap getProcessMap()
          Returns the process map to which this node belongs to.
 ITransition getTransition(java.lang.String name)
          Returns the specified transition element.
 java.lang.String getType()
          Returns the type of node.
 boolean isAutomated()
          Returns true if the node is automated.
 boolean isDeferred()
          Returns true if the node is deferred.
 java.util.Enumeration nextNodes(IWorkItem wi)
          Returns a list of the nodes the next set of work items should be created at following the completion of current work item.
 java.util.Enumeration notifications()
          Returns the list of notifications attached to this node.
 void setClassName(java.lang.String className)
          Sets class id value of the node's implementation class.
 void setForkId(java.lang.String forkId)
          Sets the node's fork id value.
 java.util.Enumeration transitions()
          Returns the list of transitions that extend from this node.
 
Methods inherited from interface com.netscape.pm.model.IPMElement
dumpState, getDescription, getName, getParent, getPrettyName, getProperty, isLocked, lockObject, postCreation, setParent, setProperties, toString
 

Field Detail

EXECUTION_STAGE_MANAGE

public static final int EXECUTION_STAGE_MANAGE
Node execution stage value for a work item that needs to retry the node manager's manage method. A work item will only have this value as its node execution stage iff the work item is in an exception state.
See Also:
IPMApplication.execute(com.netscape.pm.model.IWorkItem)
Since:
PM 6.0

EXECUTION_STAGE_PERFORM

public static final int EXECUTION_STAGE_PERFORM
Node execution stage value for a work item that has successfully completed the manage stage, and is waiting to be performed by the node's work performer.
See Also:
IPMApplication.execute(com.netscape.pm.model.IWorkItem)
Since:
PM 6.0

EXECUTION_STAGE_VERIFY

public static final int EXECUTION_STAGE_VERIFY
Node execution stage value for a work item that has successfully completed the perform stage, and is waiting to be verified by the node's work manager.
See Also:
IPMApplication.execute(com.netscape.pm.model.IWorkItem)
Since:
PM 6.0

EXECUTION_STAGE_COMPLETE

public static final int EXECUTION_STAGE_COMPLETE
Node execution stage value for a work item that has successfully completed the verify stage, and is waiting to be completed by the node's work manager.
See Also:
IPMApplication.execute(com.netscape.pm.model.IWorkItem)
Since:
PM 6.0
Method Detail

getForkId

public java.lang.String getForkId()
Returns the node's fork id value. If each parallel block (the nodes between an AndSplit and AndJoin) can be thought of as a level of depth, a node's fork id value represents the node's depth level in the process map.

The fork id value is used by the Process Manager engine to determine a work item's siblings (that is, the other work items that are positioned at the same depth level). All nodes not contained within a parallel block have a fork id value of 0. Those within a parallel block have the fork id value of the AndSplit appended with the split id value of the AndSplit node. The AndSplit and AndJoin node have the same fork id value as those nodes contained within the parallel block.

Returns:
the node's fork id value.
Since:
PAE 4.0

setForkId

public void setForkId(java.lang.String forkId)
               throws PMException
Sets the node's fork id value. Users should note that as a part of the node creation procedure, this object is locked to prevent run-time changes to its definition; hence, any calls to this method during run-time will result in an exception being thrown.
Parameters:
forkId - the node's fork id value
Throws:
PMException - if this object has been locked
Since:
PAE 4.0
See Also:
IPMElement.lockObject()

getType

public java.lang.String getType()
Returns the type of node. The current list of nodes implemented by the Process Manager engine is:
Returns:
the type of the node.
Since:
PAE 4.0

setClassName

public void setClassName(java.lang.String className)
                  throws PMException
Sets class id value of the node's implementation class. Users should note that as a part of the node creation procedure, this object is locked to prevent run-time changes to its definition; hence, any calls to this method during run-time will result in an exception being thrown.
Parameters:
className - the node's implementation class id
Throws:
PMException - if this object has been locked
Since:
PAE 4.0
See Also:
IPMElement.lockObject()

getPositionX

public int getPositionX()
Returns the x position of this node on the process map. If the image of the process map is saved from the builder, the returned value represents the x portion of the <x,y> coordinate that locates this node on the map.
Returns:
the x coordinate of this node on the process map.
Since:
PAE 4.0

getPositionY

public int getPositionY()
Returns the y position of this node on the process map. If the image of the process map is saved from the builder, the returned value represents the y portion of the <x,y> coordinate that locates this node on the map.
Returns:
the y coordinate of this node on the process map.
Since:
PAE 4.0

transitions

public java.util.Enumeration transitions()
Returns the list of transitions that extend from this node. The returned list will contain ITransition objects.
Returns:
an enumeration of all the transitions that extend from this node.
Since:
PAE 4.0
See Also:
ITransition

getTransition

public ITransition getTransition(java.lang.String name)
                          throws PMException
Returns the specified transition element.
Parameters:
name - the name of the transition to return
Returns:
the transition element with name name.
Throws:
PMException - if no such transition element has been bound to this node element.
Since:
PAE 4.0
See Also:
ITransition

addTransition

public void addTransition(ITransition tr)
                   throws PMException
Adds a transition to this node. Binding the transition to this node element will imply that the transition extends from this node.

Users should note that as a part of the node creation procedure, this object is locked to prevent run-time changes to its definition; hence, any calls to this method during run-time will result in an exception being thrown.

Parameters:
tr - the transition element to bind to this node element
Throws:
PMException - if this object has been locked
Since:
PAE 4.0
See Also:
IPMElement.lockObject(), ITransition

notifications

public java.util.Enumeration notifications()
Returns the list of notifications attached to this node. The returned list will contain INotification objects.
Returns:
an enumeration of all the notifications that are bound to this node.
Since:
PAE 4.0
See Also:
INotification

addNotification

public void addNotification(INotification not)
                     throws PMException
Adds a notification to this node. Users should note that as a part of the node creation procedure, this object is locked to prevent run-time changes to its definition; hence, any calls to this method during run-time will result in an exception being thrown.
Parameters:
not - the notification element to bind to this node element
Throws:
PMException - if this object has been locked
Since:
PAE 4.0
See Also:
IPMElement.lockObject(), INotification

getProcessMap

public IProcessMap getProcessMap()
Returns the process map to which this node belongs to.
Returns:
the process map to which this node belongs to.
Since:
PAE 4.0
See Also:
IProcessMap

isAutomated

public boolean isAutomated()
                    throws PMException
Returns true if the node is automated. A node is considered to be automated if the entity performing the work of the node is the engine; as opposed to activity nodes where the performer is the user that is assigned to the workitem.
Returns:
true if the node is automated; false otherwise.
Throws:
PMException - if there is a problem with fetching the work performer associated with this node.
Since:
PM 6.0
See Also:
IProcessMap.automatedNodes()

isDeferred

public boolean isDeferred()
                   throws PMException
Returns true if the node is deferred. A node is considered to be deferred if:
Returns:
true if the node is deferred; false otherwise.
Throws:
PMException - if there is a problem with fetching the work performer associated with this node.
Since:
PM 6.0
See Also:
isAutomated()

getExceptionNode

public INodeElement getExceptionNode()
                              throws PMException
Returns the exception node element associated with this node. An exception node is the node an exception work item is generated at when an error has occured in the current node.
Returns:
the exception node element associated with this node.
Throws:
PMException - if there is no exception node associated with this node.
Since:
PM 6.0
See Also:
INodeElement

nextNodes

public java.util.Enumeration nextNodes(IWorkItem wi)
                                throws PMException
Returns a list of the nodes the next set of work items should be created at following the completion of current work item.
Parameters:
wi - the current work item
Returns:
an enumeration of the next nodes the process instance will transition to.
Throws:
PMException - if there is a problem with determining whether the work item can follow the transitions extending from this node.
Since:
PAE 4.0
See Also:
ITransition.allows(com.netscape.pm.model.IWorkItem), INodeElement, IWorkItem

getPageDataModel

public java.lang.String getPageDataModel()
Returns a string (in the format of a JavaScript hashtable definition) of the properties of this node element. This method is used by the engine's event handler UI to output a client-side description of the current node. Users will probably not find this method of much use, and should just ignore it.
Returns:
a string containing the properties of the current node.
Since:
PAE 4.0