Unfortunately the allowed state transitions are hardcoded in the psdi.app.workorder.WOStatusHandler class and cannot be easily changed since they are defined as private arrays.
Here is a brief summary of the allowed status changes.
WAPPR | APPR | WSCH | WMATL | INPRG | COMP | CANCEL | CLOSE | |
---|---|---|---|---|---|---|---|---|
WAPPR | - | Y | Y | Y | Y | Y | Y | Y |
APPR | Y | - | Y | Y | Y | Y | - | Y |
WSCH | Y | Y | - | Y | Y | Y | - | Y |
WMATL | Y | Y | Y | - | Y | Y | - | Y |
INPRG | Y | - | Y | - | Y | |||
COMP | - | - | Y | |||||
CANCEL | - | Y | ||||||
CLOSE | - |
From status APPR you can set any target status.
This allows too much freedom in some cases so we want to restrict the allowed state transitions.
For example you might want to prevent users from changing the status of work orders that are in APPR (Approved) status to CLOSE (Closed) or CAN (Canceled).
First, navigate to Condition Expression Manager and create the following conditional expression:
- Condition: WONOTAPPR
- Description: Work Order is not in APPR status
- Type: Expression
- Expression: :status not in ('APPR')
- Always Evaluate: false
Open the the Domains application and bring up the WOSTATUS domain.
Select the CAN status row and click on the View/Modify Conditions button.
Select the "new row" button and select the new condition you created above, and click OK.
Do the same to COMP and CLOSE status if you wish.
If you now open any work order in APPR status you will notice that the list of allowed target statuses is shorter.
The good part is that the same rule applies also if you click on the quick actions.
References
- From the Maximo Support Desk - Allowable Status Changes for Work Orders
- Restricting the list of available statuses based on current record status
We have rather complex business rules about who can change what type of work order from a specific status to another so we created a new object to house the rules and built conditions to point to the rule object to determine what status' were allowed. This object was given a new custom app so the rules can be set quickly and updated whenever necessary without having to alter conditions.
ReplyDelete