IBM Support

Automation Script for Maximo Integration Framework (MIF) - Enterprise Service

Technical Blog Post


Automation Script for Maximo Integration Framework (MIF) - Enterprise Service


In the last Blog I talked about the automation script for Object Structure. Follow the link:



Now I will show an example and explain all details of an automation script using Enterprise Service.


Go to System Configuration =>  Platform Configuration => Automation Scripts.

Click on Select Action=> Create=>Script for Integration.

The pop up below will appear for you:



First select the option Enterprise Service. On this example I am using the Enterprise Service for ITEM. (MXITEMInterface).

The follow options, where I indicated using the red rectangle, basically indicate when your Automation Script will be executed. This option could change depend on what rule you are creating and when do you expect to be executed.

To understand these options click on the link below:


I am going to use the Script Language JavaScript.

Copy and paste the following code on Source Code. This code will concatenate the information of others fields and paste on the field DESCRIPTION.

//This line should not be required




var comm = irData.getCurrentData("COMMODITYGROUP");

if (comm == 'ELEC'){

irData.setCurrentData("DESCRIPTION","Desc - "+ comm + " - " + irData.getCurrentData("ITEMSETID"));



Done, the automation is ready to work.


I created a Web Service using the Enterprise Service MXITEMInterface and sent the xml below:

<soapenv:Envelope xmlns:soapenv="; xmlns:max=""&gt;





             <max:ITEM action="AddChange">











This is the result:



Now let’s understand my Javascript code.

This is a simple code. If the ITEM belongs to the commodity group ELEC, the description will be replaced for Desc – ELEC – Item Set.


Probably you noticed this line:

//This line should not be required


This command breaks the input XML so the data can be manipulated. This line should not be necessary, because the framework should do this for you. But in my case if I do not use this command the error below was returned:

Caused by: java.lang.NullPointerException
                at psdi.iface.mic.StructureObject.getCurrentNamespaceURI(
                at psdi.iface.mic.StructureObject.setCurrentData(


So if this error happens if you too, just add that line.


There are two mains object that you can manipulate into the Automation script: irData and erData.

erData: External document, is the document(XML) that you receive on the enterprise service. The manipulation of erData can only be done using XML. (Like JSON).

irData: Internal converted document, is what ends up getting mapped to the mbos(maximo business objects). This is the XML converted into object. So in this case to manipulate the data use the object irData.


 Stay tuned for more.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB02","label":"AI Applications"}}]