Automatically stop workflow on closed work orders

When using a workflow to drive the status changes of an object in Maximo you shouldn’t allow the users to change the status directly through the ‘Change Status’ action. This could be easily done removing the ‘Change Status’ sigoption from relevant users groups.
When users have both options enabled, it may happen that a closed work order has an active workflow on it.

In such cases you can create an escalation to automatically stop workflow on closed work orders.

First of all you have to create an action like this.

  • Action: STOPWF
  • Object: (leave blank)
  • Type: Custom
  • Value: psdi.workflow.StopWorkflowAction

Unfortunately the StopWorkflowAction class is not included in Maximo 7.1.

Then you can create the escalation.

  • Escalation: STOPWF
  • Applies to: WFINSTANCE
  • Condition:active=1 and OWNERTABLE=’WORKORDER’ and exists (select 1 from workorder where status in (‘CAN’, ‘CLOSE’) and workorderid=ownerid)
  • Schedule: as you like
  • Action: STOPWF

Refer to this IBM TechNote for more details.

Automatically stop workflow on closed work orders

3 thoughts on “Automatically stop workflow on closed work orders

  1. You can also use a condition node at the beginning of the workflow: where status in ('CAN','CLOSE','COMP') and then route the positive line to the stop node and route the negative line to the next node in the workflow.

    I sometimes prefer this, as it keeps the development consolidated to the workflow, and prevents potential mishaps by not having the escalation running, or stuck on a donotrun list.

  2. Good one Bruno, for my client I got 1800 Invoices stuck in workflow due to one configuration step missed by finance interface team. Now the Workflow needs to be stopped and re-routed to process these Invoices.
    I just wrote 2 escalations to handle this, and they work well.
    Regards,
    Ganesh

Leave a Reply

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

Scroll to top