Maximo Open Forum

 View Only

 automation script on non persistent object does not fire

  • Customizations
syed mehdi's profile image
syed mehdi posted 08-14-2023 04:02

Hello,

I  have  written  an automation script  object launch point on non persistent object   and this  is attached  to dialog box  in  asset  application through  relationship but  this script does not fire at all.

In the log i just see message as follows

14 Aug 2023 09:44:07:724 [INFO] BMXAA6447I - Reloading CHGASSETINIT of SCRIPT in Maximo cache.

maximo asset management version 7.6.1

Steven Shull's profile image
Steven Shull

I assume your launch point is on Initialize of the object? If so, enable the system property mxe.script.callsetuponinit. That is disabled by default but is required for the non-persistent objects during their setup event to fire the initialize automation script launch point. 

syed mehdi's profile image
syed mehdi

Hello steven thanks for your reply


I enable the proeprty mxe.script.callsetuponinit but still my script does not work.

when i refer mboset.getMbo() or  getOwner() in  script it give runtime error as undefined mboset.getMbo(), undefined  getOwner().
even my print statement is not get displayed in log.

I try with both event Initialize  and save.
in save event i did not get the above error i mentioned but  script does not work at all.
This dialog is in Asset Application based  on non persistent object . I am trying to achieve is that when user click on OK button it will update 
some attributes of asset table.

warm regards

Steven Shull's profile image
Steven Shull

We have example scripts here: https://ibm-maximo-dev.github.io/maximo-autoscript-documentation/objectscripts/objectlaunch . During setup, you need to add the new non-persistent MBO and then set the values.

If you want to fire when a user clicks the OK button though, that's not initialize (that's the execute of the non-persistent MBO) and you'd have to verify that your OK button has a proper event to trigger the execute on the non-persistent MBO. If you tie it to the save event of a non-persistent MBO we'll fire when the execute is called on the non-persistent MBO. 

syed mehdi's profile image
syed mehdi

Hello  steven,

thanks  for your reply.

Will check the link you provided. 

thanks

syed mehdi's profile image
syed mehdi

Hello  steven,

after  setting property mxe.script.callsetuponinit  and modified  the script for initialize event on non persistent object

still error is raised and i have attached script and error log for your kind  consideration. also in log i see  onsetup  variable is still shown as false.

regards

Steven Shull's profile image
Steven Shull

Your error in the logs is related to variables you have defined on the automation script. The evalINParams method is looking for any variables that are defined as IN or INOUT and then trying to bind them. I try to avoid using variable binding. I don't see a lot of value in it because you're typically not using the same script for multiple use cases and if you are, you're typically better off using library scripts.

syed mehdi's profile image
syed mehdi

Hello steven,

Thanks for your reply.