psdi.workflow

Class WFCondition

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


    public class WFCondition
    extends WFNodeDetail
    implements WFConditionRemote
    Mbo to represent WFCondition object.

    This is a system level object.

    The key attributes for this object are ProcessName, ProcessRev, NodeId and AssignId.

    The attributes in this object are as follows:

    Attribute NameDescription
    ConditionA string which will be evaluated by the workflow engine to determine a true or false value.
    CustomClass The name of the custom java class to run as part of processing this condition.
    NodeId The identifier of the Node that this condition information is related to.
    ProcessName The Process that this condition is in.
    ProcessRev The revision number of the process.
    WFConditionID Unique Identifier
    • Constructor Detail

      • WFCondition

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

      • evaluateCondition

        public boolean evaluateCondition()
                                  throws MXException,
                                         java.rmi.RemoteException
        Evaluate this condition
        Returns:
        Whether the condition evaluates to true or false
        Throws:
        MXException
        java.rmi.RemoteException
      • evaluateConditionGetAction

        public WFAction evaluateConditionGetAction()
                                            throws MXException,
                                                   java.rmi.RemoteException
        Called to evaluate the condition. Returns the action to take based on the evaluation.
        Returns:
        The Action to take.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Calling method.
      • wfValidate

        public void wfValidate(java.util.Vector errs,
                               java.util.Hashtable hinfo)
                        throws MXException,
                               java.rmi.RemoteException
        Condition Node validation
        Specified by:
        wfValidate in class WFNodeDetail
        Parameters:
        errs - A vector of MXExceptions where there are problems in the process. Any errors found will be added to this list.
        hinfo - A hashtable of information that is passed throughout the validation process
        Throws:
        MXException
        java.rmi.RemoteException
      • getWFInstance

        public WFInstance getWFInstance()
                                 throws MXException,
                                        java.rmi.RemoteException
        If we came from a condition node, then get the instance for the node. Otherwise, we are from an assignment, So get the instance from the assignment.
        Overrides:
        getWFInstance in class WFNodeDetail
        Throws:
        MXException
        java.rmi.RemoteException
      • canTakePositive

        public boolean canTakePositive()
                                throws MXException,
                                       java.rmi.RemoteException
        Determines whether this node can take a positive action. Condition nodes may have one positive action.
        Specified by:
        canTakePositive in class WFNodeDetail
        Returns:
        Returns true if this node has no positive actions already.
        Throws:
        MXException
        java.rmi.RemoteException
      • canTakeNegative

        public boolean canTakeNegative()
                                throws MXException,
                                       java.rmi.RemoteException
        Determines whether this node can take a negative action. condition nodes may have one negative action.
        Specified by:
        canTakeNegative in class WFNodeDetail
        Returns:
        Returns false.
        Throws:
        MXException
        java.rmi.RemoteException
      • addedAction

        public void addedAction(boolean wasPositive)
                         throws MXException,
                                java.rmi.RemoteException
        Task, Condition, and Subprocess nodes can only originate one action of each type, so this method clears the owning node's Take* flag corresponding to the parameter.
        Specified by:
        addedAction in class WFNodeDetail
        Parameters:
        wasPositive - Was a positive action added?
        Throws:
        MXException
        java.rmi.RemoteException
      • removedAction

        public void removedAction(boolean wasPositive)
                           throws MXException,
                                  java.rmi.RemoteException
        Task, Condition, and Subprocess nodes can only originate one action of each type, so when they lose one, they can take another. This method sets the owning node's Take* flag corresponding to the parameter.
        Specified by:
        removedAction in class WFNodeDetail
        Parameters:
        wasPositive - Was a positive action added?
        Throws:
        MXException
        java.rmi.RemoteException