2/27/2013

Maximo Developer 101: Lession 4 - Extending MBOs

One of the basic tasks in customizing Maximo is extending the MBOs. Remember, much of the business logic is placed in the MBOs so if you want to add custom business logic, you will need to extend the existing MBOs. 

First, let's talk about the path (package) naming for your custom MBOs.

Standard IBM proceedure is to use the same path, only changing the top level value. For example, the Maximo class path for Asset is: psdi.app.asset.Asset.class. So you would name your customization: myCompany.app.asset.Asset.class

Ok, now when you extend an MBO, you actually have to extend 6 class files. You have to extend the MBO class and the MBO Set class. Then there is a "remote" class for each. Finally the each has a "stub" file. I know this sounds like a lot but in truth, the most of your custom work will be in the MBO class and a maybe a little in the MBO Set file. The two "Remote" files will just be extensions of the base "remote" classes. And as for the two "Stub" files, you will use an XML file that will generate these for you.

At this point, I am going to strongly recommend you download and install the Maximo Developer for Eclipse. This tool will build the four files (MBO, MBO Set, and two remote files) for you. What makes build these files easier is that IBM uses a standing naming system for them. For example say you want to extend the Asset MBO. Well the four files are named as follows: Asset, AssetSet, AssetRemote, AssetSetRemote. (If you are using the Maximo Developer, then you will need to specify the MBO class file name and not the MBO set name.) 

The last step is you need to create an ANT file (this is just a special XML file). This file is a set of instructions that will create the two ";stub" files. The following will compile the stub files for extending the Asset MBO.

No comments:

Post a Comment