Assets description gets updated in DB anyhow.
Original Message:
Sent: 07-23-2025 09:48
From: Steven Shull
Subject: Maximo Automation scripts on parent not getting triggered on parent field updates triggered from deletion of child object script
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
Original Message:
Sent: 07-23-2025 09:20
From: Prashant Bavane
Subject: Maximo Automation scripts on parent not getting triggered on parent field updates triggered from deletion of child object script
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
------------------------------