Maximo Open Forum

 View Only
Expand all | Collapse all

Maximo Automation scripts on parent not getting triggered on parent field updates triggered from deletion of child object script

  • 1.  Maximo Automation scripts on parent not getting triggered on parent field updates triggered from deletion of child object script

    Posted 07-23-2025 09:20

    We are on Maximo 7.6.1.3 and have automation script on SPAREPART object with object launch point Save->Delete->Before Save event.
    In this script I am simply trying to update owner's i.e. assets description.
    Also i have forcefully made mbo.getOwner().setModified(True) in this script.

    There is another script on ASSET object , object launch point with Save->Update-Before Save.
    In this script I am checking if Assets description is modified and trying to create and audit entry in custom table for the change of description.
    But this script never gets triggered even when SPAREPART delete triggers first script and Assets description actually get updated and saved.

    Please advise if any forceful approach so that ASSET script gets triggered.

    I have already tried :

    instead of mbo.getOwner()   -- got parent mbo via relationship and then setModified(True)

    i have also tried mbo.getOwner().fireevent()  with different parameters for event options available 

    but nothing seems to be working so far.

    Also with raise TypeError  i could actually verify that mbo.getOwner().isModified() returns true , same for mbo.getOwner().getMboValue("DESCRIPTION").isModified()  returns true. But event after that ASSETs automation script not being triggerred.


    #EverythingMaximo

    ------------------------------
    Prashant Bavane
    ------------------------------


  • 2.  RE: Maximo Automation scripts on parent not getting triggered on parent field updates triggered from deletion of child object script

    Posted 07-23-2025 09:48
    Edited by Steven Shull 07-23-2025 09:49

    Since you're modifying the attribute, you should not need (nor should you) set the modified flag. 

    In your scenario, SPAREPART is a child of asset and the asset before save will fire prior to the spare part before save. You could explicitly invoke your script if you want (using the service.invokeScript functionality IBM Maximo Autoscripting Guide – Service variable) or you could consider using an after-save/after-commit event on the asset launch point. It's important that you're only adding to your custom audit table (and not modifying the asset in any way) in the after save/after commit because the update has already been written to the database at this point. You also don't want the script to be long running in the after save scenario because it can cause blocking at the database (since the transaction has started but not yet been committed). 



    ------------------------------
    Steven Shull
    Naviam
    ------------------------------



  • 3.  RE: Maximo Automation scripts on parent not getting triggered on parent field updates triggered from deletion of child object script

    Posted 07-23-2025 10:28
    Edited by Prashant Bavane 07-23-2025 10:28

    Thanks @Steven Shull. I have tried both After Save and After Commit events on ASSET launch point but it still dint trigger.
    When spare part deletion script triggers and set value on asset's description.

    Assets description gets updated in DB anyhow.



    ------------------------------
    Prashant Bavane
    ------------------------------