psdi.app.workorder

Class WOMaterialStatusUpdateCronTask

  • All Implemented Interfaces:
    CronTask


    public class WOMaterialStatusUpdateCronTask
    extends SimpleCronTask
    CronTask to find all of the work orders that have an internal state of APPR,WMATL, or INPROG and that have wpmaterials associated with the work order.
    • Constructor Detail

      • WOMaterialStatusUpdateCronTask

        public WOMaterialStatusUpdateCronTask()
    • Method Detail

      • cronAction

        public void cronAction()
        Description copied from class: SimpleCronTask
        This is the CORE METHOD of this class. You should invoke whatever logic you want your CronTask to perform from this method. This method should
        1. check the shutdown variable before invoking any processing logic.
        2. call resetErrorCount() if processing proceeds w/out error.
        3. call incErrorCount() if a serious error occurs during the processing logic.
        Specified by:
        cronAction in interface CronTask
        Specified by:
        cronAction in class SimpleCronTask
      • updateWOStatus

        public void updateWOStatus()
                            throws java.lang.Exception
        Updates the material status fields (Storeroom, Direct Issue and Work Pack) based on the following conditions:

        1. The current workorder or a parent of a workorder that contains planned materials
        2. The current status is a synonym value of APPR, INPROG, or WMATL
        3. The status field

        This cron task does not change the value of the workorder status.
        Throws:
        java.lang.Exception
      • refreshWorkPackHierarchy

        public void refreshWorkPackHierarchy(WORemote mbo)
                                      throws java.rmi.RemoteException,
                                             MXException
        Update the Parents Work Pack Status up the hierarchy.
        Parameters:
        mbo -
        Throws:
        java.rmi.RemoteException
        MXException
      • parentMbo

        public MboRemote parentMbo(java.lang.String wonum,
                                   java.lang.String site)
                            throws java.rmi.RemoteException,
                                   MXException
        This method fetches the Parent Work Order into a set of its own. Used in conjunction with Work Pack status updates.
        Parameters:
        wonum - Parent record to be fetched.
        Returns:
        Parent record.
        Throws:
        java.rmi.RemoteException
        MXException