October 30, 2014

Preventive Maintenance (PM) automatic work order generation

You probably know that Preventive Maintenance module in Maximo allows to schedule periodical maintenance activities in order to keep your assets running efficiently.
In other words you can use the  Preventive Maintenance to schedule the automatic generation of work orders.

Work orders can be generated manually using the 'Generate Work Orders' action in the Preventive Maintenance application. A dialog will be displayed allowing to set the number of days in the future for which the work orders must be created.



The work order generation can be easily automated using the PMWoGenCronTask cron task.
Once the cron task schedule is set you can specify the PM generation rules for each site. Open the Organization application, pick your organization and select the 'PM Options' action from the menu.
The following dialog will be displayed allowing to set the generation option for each site.



Processing all the PM records each day to generate few work orders is not the best option. Almost all the processed records will generate a warning like this:
BMXAA3191E - PM XXXXX is not due yet, or it does not fall within the active season.

A good practice is to restrict as much as possible the PM records processed using the where clause. For example the following where clause selects only the active PM records that will generate a work order in the next month.

status='ACTIVE' and
nextdate - NVL(leadtime,0) - 30 <= SYSDATE

This is important to lower PM generation workload and to avoid a long list of warning messages in the logs.


References

Using Preventive Maintenance (PM) Records to Create Work Orders
Executing PM Wogen Crontask by Site

6 comments:

  1. We often set PM.ADJNEXTDUE - will this be taken into account by the clause you refer to? Or do I have to build in additional logic?

    ReplyDelete
  2. I have "NULL" in the Where Clause field at the moment.
    The problem I may have is, I have weekly, monthly, quarterly, and annual PM's.
    At the moment we have 28 Sites and over 1900 Assets. Next year that will expand to over 500 Sites and I have no idea how many assets.
    I need Cron Task to be auto-generating WO's for these based on Lead Time, Frequency & Due Date
    So far, I have done some work in the Test environment and have not gotten any PM's to auto-generate WO's. I even had Cron Task running every 5 minutes for a while, so I could watch it.
    Cron Task did in fact run every 5 minutes, but never created any WO's.
    As far as I can see, everything is checked and set correctly. Could it be failing due to the "NULL" value?

    ReplyDelete
    Replies
    1. Yes the NULL will be the cause of the issue. Change the where clause to something sensible based on how often you run the crontask. For example, if you run it every day, you could set it to:

      status='ACTIVE' and nextdate - NVL(leadtime,0) - 1 <= SYSDATE

      to generate all the workorders for the following day.

      Delete
  3. Is it possible to use a relationship here instead of the query because the where clause it limited to 254 characters and our requirement is have more than that. Where clause is stored in the MAXVAR system table. So, we are unable to increase the width of the field.

    ReplyDelete
  4. Here is the query that we use for the WO Generation Where Clause:
    status='ACTIVE' AND nextdate IS NOT NULL AND (ISNULL(extdate,nextdate)-ISNULL(leadtime,0)) <= GETDATE()

    ReplyDelete
  5. Is nextdate field value is mandatory to generate work orders even if the 'Use Last Work Order's Start Date to Calculate Next Due Date' field is checked or unchecked?

    How about newly created PM and is newly created PM should have a value in nextdate field to generate workorder by work order genreation cron?

    ReplyDelete