Maximo Open Forum

 View Only

 Automation script debug

Jump to  Best Answer
  • Administration
  • Architecture
  • Assets
  • Customizations
  • Everything Maximo
  • Integrations
  • Maximo Application Suite
  • Work Management
Abdelrahman Abbas's profile image
Abdelrahman Abbas posted 01-12-2025 06:55

Hello ,
it's first day and first post to me .nice to meet you all :)
i want to know how to debug automation scripts in Maximo by monitoring the output, for example if i have mboSet("relationship") and i want to print a filed value 

anySet = getMboSet("relationship")

recordset= anySet.getMbo(0)

print(recordset.getString("attributeName"))

how to see the print statement in the script?

Jason VenHuizen's profile image
Jason VenHuizen  Best Answer

The the print function writes to the system standard out, which generally will write either to the SystemOut.log (Maximo 7.6) or the console.log / messages.log in MAS.  In a clustered environment you will also need to know which JVM (Maximo 7.6) or pod (MAS) you are connected to so you can find the appropriate log.

In most automation script executions there is an implement variable called "service" that is the instance of the com.ibm.tivoli.maximo.script.ScriptService class, which has functions log_[level], for example service.log_info("your message"). This will log to the maximo.script logger as defined in the Maximo logging application and give you a lot more control over where the log is written and of course the granularity of the logging.

You can also look at our VS Code extension, which provides the ability to stream the Maximo log to your VS Code environment and is handy for development purposes.

https://marketplace.visualstudio.com/items?itemName=sharptree.maximo-script-deploy

Regards,
Jason