Automation Script for Maximo Integration Framework (MIF) - Enterprise Service
PedroHFaria 310001NAMA Comments (3) Visits (13387)
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:
Copy and paste the following code on Source Code. This code will concatenate the information of others fields and paste on the field DESCRIPTION.
Done, the automation is ready to work.
I created a Web Service using the Enterprise Service MXITEMInterface and sent the xml below:
This is the result:
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:
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.