I wanted to share some knowledge about using integration automation scripts instead of XSL mapping to manipulate data.
Automation scripts have several strong advantages over XLS:
- XLS changes require redeploying the EAR file which requires downtime while automation scripts changes are applicable as soon as you hit “Save” in the Automation Scripts application
- XLS syntax is complicated and not user friendly, while automation scripts are closer to natural language and are easy to understand/debug
Below are the main functions that will give you the ability to modify the XML message (i.e. modify a value, add a value, and remove a value). I will explain them using a simple Object Structure:
Object | Parent Object | Relationship |
LEVEL1 | ||
LEVEL2 | LEVEL1 | R1 |
LEVEL3 | LEVEL2 | R2 |
LEVEL3 | LEVEL2 | R2 |
And the sample XML message would look like this:
Please see How to Use Integration Automation Scripts for more details. These functions are for outbound data manipulation. The same can be applied to inbound messages.
See attached file for a real life example. I loop through the children, concatenate some values then add them as a new attribute to the parent element.
0 Comments