psdi.workflow

Class WFNode

  • All Implemented Interfaces:
    java.rmi.Remote, MboConstants, MboRemote, MaxRemoteProxy, WFNodeRemote


    public class WFNode
    extends Mbo
    implements WFNodeRemote
    Mbo to represent WFNode object. Nodes are the "boxes" in a workflow process diagram. There are multiple types of nodes, each have an additional record that contains information unique to that node type.

    This is a system level object.

    The key attributes for this object are ProcessName, NodeId and ProcessRev. Process Name & Revision identify the process this node is a member of. Node ID identifies the node within the process.

    The attributes in this object are as follows:

    Attribute NameDescription
    DescriptionDescription of the node.
    ImageFileThe filename of the IMAGE to be displayed for this type of node.
    LdKey Long description key for DESCRIPTION field.
    NodeIdThe identifier for the node.
    NodeTypeThe type of node.
    ProcessNameThe Process that this node is related to.
    ProcessRevProcess revision.
    TitleName of the node.
    XcoordinateX Coordinate on the graphical palette.
    XcoordinateY Coordinate on the graphical palette.
    • Constructor Detail

      • WFNode

        public WFNode(MboSet ms)
               throws java.rmi.RemoteException
        Construct the WFNode object
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Mbo Initialization routine. Always read-only fields have their READONLY flag set here.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Called whenever a relationship is initialized or reset from this Mbo to another MboSet. If the process is enabled, then the nodes are read/only as well as thier detail records. Also the actions are read/only on an enabled process.
        Overrides:
        initRelationship in class Mbo
        Parameters:
        relationName - The relationship name of the related MboSet which need to initialize.
        mboSet - The related MboSet which need to initialize.
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Called when a new workflow node is created.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getWFCallStack

        public WFCallStack getWFCallStack()
        Nodes are owned by the CallStack during run-time.
      • getWorkflowActions

        public WFActionSet getWorkflowActions()
                                       throws java.rmi.RemoteException,
                                              MXException
        Returns the set of actions extending from this node.
        Returns:
        The ACTIONS related MboSet.
        Throws:
        java.rmi.RemoteException
        MXException
      • getWorkflowActionsIn

        public WFActionSet getWorkflowActionsIn()
                                         throws java.rmi.RemoteException,
                                                MXException
        Returns the set of actions pointing to this node.
        Returns:
        The ENTERINGACTIONS related MboSet.
        Throws:
        java.rmi.RemoteException
        MXException
      • makeNodeNotifications

        public void makeNodeNotifications()
                                   throws java.rmi.RemoteException,
                                          MXException
        Creates Notifications from templates.
        Throws:
        java.rmi.RemoteException
        MXException
      • completeWorkflowAssignment

        public boolean completeWorkflowAssignment(WFAssignment assignMbo,
                                                  WFAction actionMbo,
                                                  java.lang.String memo)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Complete the workflow assignment.
        Parameters:
        assignment - The assignment completed.
        action - The action to now take.
        Returns:
        true if the Assignment is complete. Assignments with multiple responders may wait until all have responded.
        Throws:
        MXException
        java.rmi.RemoteException
      • stopAtNode

        public void stopAtNode(java.lang.String memo)
                        throws java.rmi.RemoteException,
                               MXException
        Stop assignments related to this node. There will only be assignments if this is a task node. if it is a wait node, the wait node will be deactivated.
        Parameters:
        memo - Stop assignment memo.
        Throws:
        java.rmi.RemoteException
        MXException
      • writeTransaction

        public void writeTransaction(java.lang.String transType,
                                     java.lang.String memo)
                              throws MXException,
                                     java.rmi.RemoteException
        Write a transaction
        Throws:
        MXException
        java.rmi.RemoteException
      • hasOwnerNode

        public boolean hasOwnerNode()
                             throws MXException,
                                    java.rmi.RemoteException
        Called by the validation routines to determine whether this node has at least one arrow pointing to it.
        Returns:
        true if pointed to. This should be true for all nodes except start nodes.
        Throws:
        MXException
        java.rmi.RemoteException
      • countPositiveAction

        public int countPositiveAction()
                                throws MXException,
                                       java.rmi.RemoteException
        Counts the number of positive actions extending from this node.
        Returns:
        The count of positive actions.
        Throws:
        MXException
        java.rmi.RemoteException
      • countNegativeAction

        public int countNegativeAction()
                                throws MXException,
                                       java.rmi.RemoteException
        Counts the number of negative actions extending from this node.
        Returns:
        The count of negative actions.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasPositiveActionIn

        public boolean hasPositiveActionIn()
                                    throws MXException,
                                           java.rmi.RemoteException
        Determine whether any postive actions point to this node.
        Returns:
        true if there is one positive action pointing to this node.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasNegativeActionIn

        public boolean hasNegativeActionIn()
                                    throws MXException,
                                           java.rmi.RemoteException
        Determine whether any negative actions point to this node.
        Returns:
        true if there is one negative action pointing to this node.
        Throws:
        MXException
        java.rmi.RemoteException
      • countPositiveActionIn

        public int countPositiveActionIn()
                                  throws MXException,
                                         java.rmi.RemoteException
        Counts the number of positive actions extending to this node.
        Returns:
        The count of positive arrows pointing to this node.
        Throws:
        MXException
        java.rmi.RemoteException
      • countNegativeActionIn

        public int countNegativeActionIn()
                                  throws MXException,
                                         java.rmi.RemoteException
        Counts the number of negative actions extending to this node.
        Returns:
        The count of negative arrows pointing to this node.
        Throws:
        MXException
        java.rmi.RemoteException
      • getCompanionSet

        public MboSetRemote getCompanionSet()
                                     throws MXException,
                                            java.rmi.RemoteException
        Get the companion MboSet that has node type specific information for this node. Depending when this method is called, the set returned will have zero or one member.
        Specified by:
        getCompanionSet in interface WFNodeRemote
        Returns:
        The companion MboSet, one of WFStartSet, WFStopSet, WFSubProcessSet, WFConditionSet, WFInputSet, or WFTaskSet or WFWaitList or WFInteraction.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WFNode.getCompanionSet()
      • delete

        public void delete(long modifier)
                    throws MXException,
                           java.rmi.RemoteException
        When a node is deleted, all actions originating or arriving at the node are deleted, too. Also the node detail record is deleted.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        modifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • undelete

        public void undelete()
                      throws java.rmi.RemoteException,
                             MXException
        Description copied from class: Mbo
        Unmark the Mbo for deletion. Can only be called after a delete() and before the save() has been performed. This method will also unmark associated Long Description and Translation Mbos.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        java.rmi.RemoteException
        MXException
      • hasNodeActions

        public boolean hasNodeActions(boolean isPositive)
                               throws MXException,
                                      java.rmi.RemoteException
        Determines whether a node has an action, of a certain type, coming out of it.
        Parameters:
        isPositive - Is this a positive action?
        Returns:
        Returns true if there's at least on action of the given type coming out of the given node.
        Throws:
        MXException
        java.rmi.RemoteException
      • getNodeDetail

        public NodeDetail getNodeDetail()
                                 throws java.rmi.RemoteException,
                                        MXException
        This returns an object which has node specific data about this node.
        Returns:
        The NodeDetail for this node.
        Throws:
        java.rmi.RemoteException
        MXException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        The Start node cannot be deleted.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - Thrown with "workflow", "NoDelStart" if this is a start node.
        MXException
        java.rmi.RemoteException
      • duplicateDetails

        public void duplicateDetails(WFNode origNode)
                              throws java.rmi.RemoteException,
                                     MXException
        Copy the details of this node. This method called after the WFNode attributes are copied.
        Parameters:
        origNode - The original node details
        Throws:
        java.rmi.RemoteException
        MXException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Validation Order for WFNode attributes. Note NODETYPE included because it creates sub-records some nonpersistent attributes look at.
        Overrides:
        getValidateOrder in class Mbo