Groovy script
The Groovy mapping transforms message fields by executing a Groovy script. The script can produce an output to populate a field in the transformed message or modify the message directly.
Groovy mappings are useful when transformation requirements cannot be fulfilled using standard mapping types.
Attributes for Groovy Script
| Attribute | Required | Description |
|---|---|---|
| From | Yes | Defines the source field for the mapping. |
| To | Yes | Defines where the result should be inserted. |
| Precedence | Yes | Determines the order in which this mapping is applied relative to others. |
| Function | Yes | Set to "Scripted mapping". |
| Function type | Yes | Set to "Groovy script" |
| Script | Yes | Custom groovy script that transforms one or more message fields. |
For more information on what can be done in Groovy scripts, go to: Groovy Mapping