What Mbo/MboSet/MboValueAdapter method should I override?

This entry is part of the Maximo Java Development series.

One of the biggest issues when implementing Java customizations in the Maximo Business Objects layer is to know what is the best method to override to achieve a specific goal.
Here I have listed the most common usages of the the main methods in Mbo, MboSet and MboValueAdapter classes.

Mbo

  • init(): Called by the framework when the Mbo has been constructed and the MboValues have been initialized.
    • Custom initialization
    • Set field access
  • add(): This is called when a new Mbo is added to the MboSet. It is called after user defaults have been set from the data dictionary.
    • Set field defaults
  • save(): Save the object and other linked objects.
    • Update linked/child objects
  • delete(long accessModifier): Mark the object to be deleted depending on the access modifier. Object is not actually deleted in the database until save() is called.
    • Delete child objects

MboSet

  • canAdd(): Can an object be added to the collection ?
    • Custom rules to avoid the addition of new records to the MboSet

MboValueAdapter

  • initValue(): The first method executed after the constructor. Values are already loaded from the database
    • Initialize attributes on new records
  • init(): Called after initValue()
    • Set current attribute as read-only based on some condition
    • Set related attributes access flags
  • validate(): Called when field value is changed (tab-out)
    • Verify whether the value for the attribute is valid
  • action(): Called when field value is changed after validate()
    • Update to other fields and related objects

Note: Be careful when extending Maximo Business Objects and don’t forget to follow the Java MBO performance optimization golden rules.

What Mbo/MboSet/MboValueAdapter method should I override?

One thought on “What Mbo/MboSet/MboValueAdapter method should I override?

  1. Please could you please give me an example explain how can i use action() method
    and what is the meaning of MboValueAdapter and how can i use it in automation script

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top