Inbound processing of object structures
The processing of inbound messages by the integration framework supports the use of automation scripts on the object structure to support custom logic. This use of automation scripts allows customization for any inbound integration message that uses an object structure and for customization of processing Migration Manager data.
For integration processing, a script that is implemented on the object structure applies to messages from the following sources:
- Data import
- REST
- Application import
- Web service
- OSLC
- Integration servlet
- Integration tables
The object structure supports a Java™ processing class or an automation script. You can use a Java processing class, an automation script, or both on the same object structure. The processing supports functions that are in either the class file or the automation script.
A context (ctx) is passed between the processing class of the inbound object structure and the automation script, which implements the custom code. The context is supported bidirectionally. Predefined APIs are available for the context. The script framework provides a built-in Java class that prepares a context.
All of the following code examples and fragments use JavaScript. You can implement the logic at the following points in the processing:
- Before the processing of a Maximo® business object. For example, the beforeProcess(ctx) function is processed once for each noun in the inbound message before business objects that are related to the message are created.
- During the processing of a Maximo business object. For example, the beforeCreateMboSet(ctx) function is processed sequentially for each object within every noun in the inbound message. Other functions that are processed sequentially include afterCreateMboSet(ctx), mboRules(ctx), beforeMboData(ctx), and afterMboData(ctx).
- After Maximo business object processing completes. For example, the preSaveRules(ctx) and changeStatus(ctx) functions are processed once for each noun in the inbound message after the business objects are created.
In the Automation Scripts application, you can create a script for integration to include in the object structure processing.