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
(NVL(extdate,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.


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

Preventive Maintenance (PM) automatic work order generation

11 thoughts on “Preventive Maintenance (PM) automatic work order generation

  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?

  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?

  3. 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.

  4. 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.

  5. 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()

  6. 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?

  7. Can you please explain the difference between "Generate WOs Due on the Current Date Plus This Number of Days" field in PM options vs Lead Time (days) in PM screen?

  8. I get the PM WO GEN emails for dev, test and Prod everyday. I want to be able to differentiate between them and know which one came from dev, test and PROD. Is there a way to change the Subject line to ‘Generate Work Order from PM in site FM Notice PROD’ ? Please let me know. Thanks

  9. pm ,jobplan ,asset all data are correct and also pm can not generate workorder and write in log file that error generate workorder and sometimes asset is not valid and another sometimes jobplan is not valid

  10. On the character limitation; We’ve added a view to the system that allows for a more complex selection criteria and select from the view by site from the PM Options dialogue.

    pmuid in (select pmuid from pmwogenwhere where siteid = ‘BEDFORD’)

    create or replace view pmwogenwhere as
    select pmuid, orgid, siteid
    from pm
    where status = ‘ACTIVE’
    and nextdate is not null
    (exists (select null from pmmeter pmm where pmm.siteid = pm.siteid and pmm.pmnum = pm.pmnum)
    or (
    ((nextdate – nvl(leadtime, 0) – (select varvalue + 30 from maxvars mv where mv.varname = ‘WOGENERATIONDAYS’ and mv.siteid = pm.siteid ) <= sysdate)
    or (extdate is not null and extdate – nvl(leadtime, 0) – (select nvl(varvalue, 0) + 30 from maxvars mv where mv.varname = 'WOGENERATIONDAYS' and mv.siteid = pm.siteid ) <= sysdate)
    and case
    when sysdate = to_date(to_char(trunc(sysdate))||’ 01:00:00′, ‘dd-mm-yy hh24:mi:ss’)
    then 1
    else 0
    end = 1

    The case section generates only daily PM’s from midnight to 1 AM, after that all PM frequencies are considered – this gets our daily PM’s generated quickly in the AM and then can generate them again if needed throughout the day.

    This works for us, it’s not necessarily perfect for everyone, but it does allow for a much more carefully planned out “where clause” for PM generation.

  11. Our “Generate Work Order from PM in site XX Notice” email used to show each message on its own line in the email. Something has changed and now all messages just show one after the other with no line return between them.

    Here is an example:
    BMXAA3208I – PM 124038 created work order 32600932. BMXAA3208I – PM 124038 created work order 32600933. BMXAA3208I – PM 124038 created work order 32600934. BMXAA3208I – PM 124054 created work order 32600935. BMXAA3208I – PM 124056 created work order 32600941. BMXAA3208I – PM 124057 created work order 32600944. BMXAA3208I – PM 124059 created work order 32600945. BMXAA3208I – PM 124060 created work order 32600946.

    Is there a remedy for this? Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top