psdi.app.pm

Class PMWoGenCronTask

  • All Implemented Interfaces:
    CronTask


    public class PMWoGenCronTask
    extends SimpleCronTask
    This is a Cron task that generates workoders from PMs. The CronTask checks 'AUTOPMWOGEN' flag in MAXVARS table for all the sites in the system. It generates the workoders only if the 'AUTOPMWOGEN' flag is set to 'Yes' for a given SITE.
    The "WhereClause" for getting the PMSet is read from MAXVARS (WOGENWHERECLAUSE) for a given site. For each of the PM in this set, generateWork() will be called by passing "WOGENUSEFREQCRITRA" and "WOGENERATIONDAYS" of the site as parameters. After the work orders are generated, the results are emailed to the address specified by the MaxVar 'WOGENEMAIL'.
    • Constructor Detail

      • PMWoGenCronTask

        public PMWoGenCronTask()
    • Method Detail

      • readConfig

        public void readConfig()
                        throws java.rmi.RemoteException,
                               MXException
        Read in the configuration information from cron task instance parameters. If not specified in the cron task instance parameters get it from the mxserver properties.
        Throws:
        java.rmi.RemoteException
        MXException
      • getName

        public java.lang.String getName()
        returns the name of this CronTask.
        Overrides:
        getName in class SimpleCronTask
      • cronAction

        public void cronAction(java.lang.String filter)
        method that does the workorder generation task
      • getLogFilePath

        public java.lang.String getLogFilePath()
        Returns the complete path of the logfile for PM Work order Generation Crontask
      • getParameters

        public CrontaskParamInfo[] getParameters()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Description copied from interface: CronTask
        This method provides an array of CrontaskParamInfo() object to describe all the parameters of the crontask. Parameter name, default values and the description of the parameter should be set to the CrontaskParamInfo object for each parameter. If default value and description is not set, null will be the values.
        Specified by:
        getParameters in interface CronTask
        Overrides:
        getParameters in class SimpleCronTask
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        CrontaskParamInfo