Maximo Open Forum

 View Only
  • 1.  DELAYVALIDATION MBO Constant

    Posted 02-10-2025 08:00

    DELAYVALIDATION is a "new to me" MBO Constant. I regularly use NOACCESSCHECK and NOVALIDATION but DELAYVALIDATION isn't one that I was aware of. A smart developer recently leveraged this to make one of my scripts work perfectly. When setting a value with DELAYVALIDATION any processing that occurs after this script executes cannot set to this field value. In the correct situation, this is a smart way to short-circuit out-of-box logic that runs after an automation script. 

    Example: mbo.setValue("PERSONID","MAXADMIN",mbo.DELAYVALIDATION)


    #Administration
    #Customizations

    ------------------------------
    Phil Runion
    Projetech
    ------------------------------


  • 2.  RE: DELAYVALIDATION MBO Constant

    Posted 02-10-2025 10:21

    To prevent java classes from later setting it, I would use the NOSETVALUE flag on the attribute instead. This is used by the MIF to prevent java classes from overriding something provided in the message payload. Something like:

    mbo.setValue("PERSONID","MAXADMIN")
    mbo.setFieldFlag("PERSONID",mbo.NOSETVALUE,True)


    DELAYVALIDATION is also used by the MIF but is intended to handle scenarios where values may not be set in the correct order. It tells the framework we don't want the validation to fire until everything has been provided. For example, if you tried to set the ASSETNUM before the SITEID, the ASSETNUM validation would normally fail because it would try to find that asset in a correct status with a NULL siteid. By delaying validation, we can wait until the SITEID has been set and thus the validation occurs as expected. 



    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 3.  RE: DELAYVALIDATION MBO Constant

    Posted 02-12-2025 07:34

    Thank you for expanding my understanding. Your note is well taken. 



    ------------------------------
    Phil Runion
    Projetech
    ------------------------------