Technical Blog Post
Automation Script for Maximo Integration Framework (MIF)
Automation Script for Maximo Integration Framework (MIF) is introduced in 7.6 and is a good practice to create and manipulate data. You have the same functionality as the Java Class. But in this case you are not going to lose your class if you upgrade Maximo.
Let’s take a look at a simple example.
Creating an Automation Script for an inbound Object Structure
- Go to System Configuration => Platform Configuration => Automation Scripts.
- Click on Select Action => Create => Script for Integration.
- You have a couple options now. We are not going to cover all options now, but in the near future.
- Select Object Struture
- On Object Structure field we are going to create an example using ITEM. Fill in with MXITEM
- Select Inbound Pocessing
- Copy and paste the following code on Source Code. This code just checks if the commodity group of the item is ELEC. If yes, it will fill in the description with the word ELECTRICAL ITEM.
- Click on Create button.
Done, the automation is ready to work.
I created a Web Service using the Object Structure MXITEM and sent the xml below:
This is the result:
I am using the function beforeMboData(ctx), this function already exists on Maximo framework . The beforeMboData(ctx) function is available when the Maximo business object is created but before the values in the business object are set by the integration framework. Processing of the object structure can change the setting of business object data. Processing can also set flags on the fields, such as the samevaluevalidation flag, which triggers field validations even when the field value is set with the current value of the field.
You can find all functions on the link below:
The others methods and the rest of the code, if you already created a Java code for Maximo you will recognize.
TIP: If you need DEBUG your code use the command print. For example:
print(“Test command print”);
This command will print the string on the Systemout log, this is a way to see values of a variable for example.