Maximo Open Forum

 View Only

 How to import service object into maximo 7.6.1.2

  • Everything Maximo
Anudeep Kolluri's profile image
Anudeep Kolluri posted 03-24-2026 22:03

I see service objects (https://www.ibm.com/docs/en/masv-and-l/maximo-manage/cd?topic=concepts-service-object) are being used to abstract away alot of code. I know it works in latest versions of MAS but, from the following article, it should be working in maximo 7.6.1.2 but I get below mentioned error.

MaximoDev - Service object methods in automation scripts

Traceback (most recent call last):
File "<iostream>", line 1, in <module>
NameError: name 'service' is not defined

How to import/use service object in my version of Maximo.

Thanks in advance.

Steven Shull's profile image
Steven Shull

What is your automation script on? Some script launch points (such as integration IBM Maximo Autoscripting Guide – Object structure scripting) you'll have a method where you pass in a parameter that you need to use instead. In the IBM documentation, the parameter is ctx so you'd use:

ctx.error() instead of service.error()

Also, if you're calling the script as a library script you'll need to pass in the service parameter to your library script.