Search This Blog

Monday, February 21, 2022

MAXIMO: Creating Stateful MBO

 In this post, lets  understand what are key steps involved to create  to custom Stateful Mbo to have change status functionality as in standard maximo applications.

Here are the high-level steps:


1. Create table to store status history (table should include key from the main table in the application and STATUS, MEMO, CHANGEBY and CHANGEDATE fields).
2. Create a non-persistent table – this table will be used in a dialog to set STATUS, STATUSDATE and MEMO (table should consist of STATUS, STATDATE, and MEMO fields).
3. Create relationships from main object to status tables created in steps 1 and 2 and another one called STATUSDESC to SYNONYMDOMAIN.
4. Make sure main record in custom application has STATUS and STATUSDATE fields.
5. Create the status list in SYNONYMDOMAIN.
6. The Mbo class for the application should extend StatefulMbo.
7. Create getStatusHandler(), getStatusListName(), getStatusHistory() methods in Mbo class.
8. Create handler class that extends StatusHandler (the handler should be returned in getStatusHandler() method).
9. Create classes in virtual folder for the non-persistent MboSet. Set the STATDATE field in the add method to the current date.
10. Create classes for persistent status table. Set key field, status, changeby and changedate in add() method.
11. Create dialogs, sigoptions, actions, toolbar button, etc.

12. Grant permissions to sigoptions/app.

No comments: