psdi.workflow

Class WFTask

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


    public class WFTask
    extends WFNodeDetail
    implements WFTaskRemote
    Mbo to represent Workflow Tasks. Tasks are things in the workflow process which need to be done something outside of workflow, i.e. an auditor may need to approve the financial data on a work order. In an enabled process, a task must have at least assignment defined to say who must do the task.

    In this Mbo, there are two non-overlapping mbosets of assignments obtained by relationship "activeassignments" and "defaultassignments". Any updating operation on the assignments of this task have to be operated on these two mbosets.

    This is a system level object.

    The key attributes for this object are NodeId, ProcessName and ProcessRev. These attributes are shared by all WFNodeDetail Mbo subclasses.

    This mboset has four additional attributes, unique to this type of NodeDetail: ReadOnly, FirstComplete, App, & TimeLimit.

    The attributes in this object are as follows:

    Attribute NameDescription
    AppDefault application to launch for this task.
    FirstCompleteWill the first person to complete an assignment complete the task? If N then all of the assignments must be complete before a new current task is calculated.
    NodeIdThe WFTASK type Node that this task is related to.
    ProcessNameThe Process that this node is related to.
    ProcessRevProcess revision.
    ReadOnlyShould the application associated with this task be read only for all users other than those assigned to the task?
    TimeLimitTime in hours that can pass before the task is escalated.
    • Constructor Detail

      • WFTask

        public WFTask(MboSet ms)
               throws java.rmi.RemoteException
        Constructor
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • add

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

        public boolean completeAssignment(WFAssignment assignment,
                                          WFActionRemote action,
                                          java.lang.String memo)
                                   throws java.rmi.RemoteException,
                                          MXException
        Completes the assignment selected and evaluates whether the process should continue now. If the FirstComplete flag is set or a negative action taken, this node is done. The node is also done if there are no more active assignments.
        Parameters:
        assignment - The assignment to complete (from the instance's ActiveAssignments set.)
        action - The action to take.
        memo - Assignment completion memo.
        Returns:
        Is this node done?
        Throws:
        java.rmi.RemoteException
        MXException
      • stopAssignment

        public void stopAssignment()
                            throws java.rmi.RemoteException,
                                   MXException
        Stops all assignments.
        Throws:
        java.rmi.RemoteException
        MXException
      • wfValidate

        public void wfValidate(java.util.Vector errs,
                               java.util.Hashtable hinfo)
                        throws MXException,
                               java.rmi.RemoteException
        Validate the task node specifics.
        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
      • canTakePositive

        public boolean canTakePositive()
                                throws MXException,
                                       java.rmi.RemoteException
        Determines whether this node can take a positive action. Task 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. Task 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
      • delete

        public void delete(long modifier)
                    throws MXException,
                           java.rmi.RemoteException
        When a task is deleted, delete the assignments
        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)