In the previous post, I have provided an example on how we can
customize Object Structure to enable import/export binary data via MIF. In
Maximo 7.6, the automation scripting framework has been greatly extended to
support integration. With this update, we can enable import/export of binary
data by adding a simple script without having to write and deploy custom java
code. Below is an example how we can configure Maximo 7.6 to bulk upload images
to Item Master application:
Step 1: Add an Object
Structure integration script
- Open System Configuration > Platform Configuration > Automation Script application
- On Select Action menu, choose Create > Script for Integration
- On the Create Script for Integration pop-up, enter the following details:
- Select “Object Structure”
- Choose “MXITEM” for Object Structure
- Select “Inbound Processing”
- Language: Python
- Paste the following piece of code to the Source Code text area:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from org.apache.axiom.om.util import Base64 | |
def afterMboData(ctx): | |
if ctx.getMboName()=='IMGLIB': | |
ctx.getMbo().setValue("IMAGE",Base64.decode(ctx.getData().getCurrentData("IMAGE"))) |
- Click on Create. Then save the script