When 'app' isn't enough...

Maximo automation scripting includes several "implicit" variables and objects--these are "out-of-the-box" pre-provided items to make programmers' lives easier.  One of these is mbo--by default, mbo is mapped to the Maximo business object from which the script was launched.  Another is app--this variable is meant to show the application "name" (i.e. the primary key for the application like WOTRACK or ASSET) from which the script is launched.  This variable is very useful, since sometimes you want a script to only be applicable on certain application screens.

The PROBLEM is that there are times when app doesn't resolve to ANYTHING--when, even though your script is running within an application screen, the application name resolves to NOTHING.  An excellent example of this is when you have an automation script that runs against an mbo in a child table, or from within a dialog box on the application screen.

The SOLUTION is fortunately pretty simple--at the start of your automation script, define an "explicit" variable and use the function mbo.getThisMboSet().getParentApp() to put the true application name into your explicit variable.  This will allow you to properly evaluate the application within your script.

To view or add a comment, sign in

More articles by Jade Warren

Explore content categories