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.

Comments