Thursday, October 24, 2013

What are Beans in IBM Maximo

The information provided in this post is based on my Maximo 6 experience. I don’t know if or to which extent it has changed in Maximo 7.

There are 2 types of Beans in IBM Maximo, AppBean and DataBean.

The AppBean manage application functionality, such as WOTRACK or ASSET. 

This class is defined in the beanclass attribute of the presentation tag in the application’sXML.

If you export the WOTRACKapplication xml and go to the bottom of the file you can see a group of actions (action tag) defining actions and their corresponding method in the AppBean beanclass.

For instance if you’d like to add a button on WOTRACK to approve a workorder (OOTB in Maximo 7 but not in 6) besides of creating the SIGOPTION andTOOLBAR records for that operation you’d also have to develop custom Javacode for it, this would be done in the AppBean. 


Data Beans can manage both dialog boxes and tables. The DataBean class associated is defined in the beanclass attribute of both the dialog and tabletags in the application’s XML.

For instance, on dialog boxes you can use a DataBean to control what to do when the OK button is pressed (submit() method).

On tables you can do things such as custom the way to load the MBOSet on that table (getMboSet() method).

You have to have in mind that the flow control of the dialog’s execution is quite complex.
 For instance, if you don’t provide a submit() method on your dialog’s bean class, Maximo will try executing other methods and will end up executing the execute() (I think this is the method) method of the MBOSet asociated with your dialog (defined with the mboname attribute of the dialog tag).
 If you export the WOTRACK application xml and go to the bottom of the file you can see a group of actions (action tag) defining actions and their corresponding method in the AppBean beanclass. ”
The Action tag in Presentation XML for any application, associates an event with a method on the primary MBO for that application, this code is not neccessarily associated with a method on a bean class.
The id specified in the action specifies the event-name for the method on the primary mbo.


This invokes the createWorkorder method on the WO mbo when the “CREATEWO” event is raised within the WOTRACK app.
When a button is pushed, or other action is generated in a Maximo screen, it generates a WebClientEvent (such as “CREATEWO”)
The Maximo event-handler will walk up it’s hierarchy of Data and App bean classes, looking for a method with a name matching the event. if it finds one, it executes that code.
If no matching method is found (or if the method returns with EVENT_CONTINUE), it will check the Action tags within the presentation, and execute the associated method on the primary mbo if found.
If no matching action is found in the presentation, it searches for a dialog of the same name within that application and invokes that.
if no matching dialog is found on the application xml, it searches LIBRARY.xml for the dialog, and opens that dialog if found.
Failing all of this, a nothing-handled-exception gets thrown.

No comments:

Post a Comment