Technical Blog Post
Abstract
Set up a PM with an expiration flag to automatically be deactivated
Body
Some clients have asked if it possible to set up a PM so that it is no longer valid after a number of work orders are generated or past a certain date?
With a little configuration and the use of an escalation, a PM can automatically be deactivated based on number of uses or date (or any other criteria that is applicable)
In Database Configuration, add a field to PM to mark it for limited use
Optional Step: In Database Configuration, add a field to PM to mark the date after which it should be deactivated (if date is the criteria that will drive the PM to be deactivated)
Now Using Application Designer, we will add the new field(s) to the PM application.
Create an escalation to deactivate the PM when the criteria is met. Criteria of escalation can be based on anything, e.g. the current status is active, the limited use flag (new field added above) is checked and the date the PM is active until (new field added above) is in the past.
Or the current status is active, the limited use flag (new field added above) is checked and the counter is 1 (1 work order has been generated from the PM).
The action associated with the escalation should change the status of the PM to inactive if the PM meets the criteria within the escalation.
Once the PM is validated and activated it will run based on the specified schedule. Any PMs that meet the criteria of the escalation will now be deactivated
UID
ibm11132287