Local map

A Local map is a transform that provides a hierarchical view of element transforms in a message map. A Local map enables you to create a more efficient transformation because the nested mapping is executed by default if the primary input is available at run time.

Overview

You can use local maps to break up a large map into nested groups of mapping elements and process the complex elements of the whole data object.

Local maps are a partial view of a larger map, rather than separate files.

The local map does not transform data. You must specify transforms for the input and output elements in the nested map.

Inputs and outputs

A local map has at least one element as input (either a simple type or a complex type), which can contain nested elements. You can add more inputs to a local map, as supplementary, to allow extra simple type or complex type element data to be available in the nested mapping, or use them to provide a condition for when the nested mapping is executed.

The output can be either a single element or an array element, but it must be a complex type.

If you add another input as the primary input, the Graphical Data Mapping editor typically changes the transform type from Local map to a more applicable type. For example, when you add an extra simple element as a primary input to a local map that has an existing primary input, the Graphical Data Mapping editor changes the transform type to Concat.

When you connect a repeating input to a Local map transform, only the first instance of the array is processed. If you need to process multiple indexes of the array, you must use the For Each transform. For more information, see For Each.

Define when the transform is applied at run time

You can define multiple connections between input elements and the Local map transform. You can then use these input elements in a conditional expression that defines the condition under which the transform is applied. If the condition evaluates to true, the transform is applied.

You can use the input connected with a primary connection to the transform. To add more inputs, or to provide a condition for when nested mapping is executed, you can define Supplement connections between input elements and the transform. If you do not provide a condition, and the primary input is optional in the schema model (minOccurs=0), the nested mapping of the local map is executed only if the primary input is available.

Alternatively, to define the conditional expression, you can call a static method on an imported Java™ class. You can also create a complex expression comprising XPath, Java and extension functions such as iib:getUserDefinedProperty("propertyname").  

You configure the expression in the Condition tab that is available in the Properties page of the transform.

For more information, see Configuring the properties of a transform, Defining an XPath conditional expression for a transform and Defining a Java conditional expression for a transform.