IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Submaps

You can use a submap to use the same mapping transformation in multiple message maps.

Submaps enable you to use a set of mapping functions in multiple message maps to transform a common set of elements in the input object to the output object.

A submap transform references another map. It calls or invokes a map from a separate file, which can be stored in a library, an application, an integration service, or an Integration project.

A submap can contain components of the message body only, such as global elements and global types. A submap does not contain Properties, message headers, or the Local Environment tree. The element or type must be defined in a message model, and cannot be a user-defined element.

For more information, see Creating a submap.

When using submaps, you must consider the following behavior:

Editing a submap

You edit a submap in the Graphical Data Mapping editor.

The Graphical Data Mapping editor saves submaps as .map files.

For more information, see Graphical Data Mapping editor.

Input and output data to a submap

To configure the input and the output to a submap transform, you connect one or more inputs, and a single output.

The input message and the output message must be defined by a user-provided message model in a schema file.

You must have message models for any messages that you want to include in a mapping. You can select the message model from your existing message models in your application, integration service, or library when you create a message map. The mapping facility supports message models that are provided in DFDL schema and XML schema files, or MRM message sets.

If your message model includes user-defined data elements, wildcards, or xsd:any, you can use a Cast function to redefine these data elements to a global type or element from any message schema in your application. For more information, see Casting wildcards in a map.

In a message map, input and output objects are defined by reference to message models, which provide a definition of the message structure and type through the following components:
  • Simple elements and attributes, which define the type, range, and default values
  • Complex elements, which build the structure of the message
  • Repeating simple or complex elements
  • Other (embedded) messages

Mapping operations

You can use any of the following transforms to map graphically your data in the Graphical Data Mapping editor:
  • Core mapping transforms: You can use built-in structural and functional mapping operations, which enable you to graphically construct the required message transformations to build the output message.
  • Custom transforms: You can use custom transformations to build your own XPath 2.0, Java™, or ESQL functions, which can be invoked to perform specialized transformations within the message map.
  • XPath functions (fn:functionName): You can use XPath 1.0 and XPath 2.0 functions to transform data in a message map.
  • Database transforms:
    • You can use the Select transform to query one or more database tables, and retrieve data that you can use in the message map to set output element values, define conditions, or use as input to build other transforms conditions. Database tables can be set as additional outputs of a message map.
    • You can use a database routine transform to call a stored procedure or user-defined function from a database, and retrieve data that you can use in the message map to set output element values, define conditions, or use as input to build other transforms conditions.
      Note: Only IBM® DB2® stored procedures are supported in IBM Integration Bus.
    • You can use the Insert transform to add one new row of data, or multiple rows of data, into a database table.
    • You can use the Update transform to modify a row of data, or multiple rows of data, in a database table.
    • You can use the Delete transform to delete a row of data, or multiple rows of data, in a database table.
  • Cast function: You can use the Cast function to cast schema types.

For more information, see Mapping operations.

Invoking a submap

A submap can be referenced from other message maps.

When you construct your transformation map, you can invoke a submap to perform a part of the message transformation. The submap must be located in a project visible to the main map that they are called from.

To invoke a submap, you define a Submap transform between the input object and the output object in your message map. This submap can then be used to enable reuse of common transformations for sections of, or the whole of, the message.

For more information, see Calling a submap.

Considerations

  • A submap can provide callable mapping between global elements or global types from a message model.
  • A submap cannot be used for local anonymous complex types. These must be mapped within the main map, for example, by a local map.

Reusing a submap

You can use a submap to reuse common data transformations.

You can reuse submaps in other solutions, and in other products that support graphical data maps.

Note: If you plan to reuse a submap across different products, read Guidelines for developing reusable graphical data mapping assets.


cm28814_.htm | Last updated Friday, 21 July 2017