Designing a graphical data map

You can use a graphical data map to graphically transform, route, or update an external system. For best performance and capability, you must design it to include the most appropriate transforms.

Consider the following guidance to design a graphical data map:

  1. Design the data model of your input and output message per the solution requirements.

    The function of a graphical data map is driven by the data models that define the input and the output message structures of a map. At run time, the Graphical Data Mapping engine must account for all possible states of the data when executing the transformations you have defined in the map against the data models. You may have control or not over the data models in your solution. If you can influence the data model, these are some of the key points to consider:

    1. Set the cardinality of each element in a data model to specific values whenever possible.

      When you define a logical model, you can configure the cardinality of each element by setting the minoccurs and the maxoccurs properties.

      Avoid, whenever possible, configuring maximum flexibility unless actually required. Only set minoccurs to 0, when an element needs to be optional. Only set maxoccurs above 1 if the element will actually repeat.

    2. Define an element as nillable when you know that the application will need to handle out of bound value in the data.
  2. Identify the type of graphical data map.
    1. Use a graphical data map to graphically transform, route, and enrich a message.
    2. Use a submap to define a set of mapping functions that you can reuse in multiple graphical data maps.

      For more information, see Creating a submap.

  3. Identify the input and output components to a graphical data map.
  4. For each output element, identify the transform and the input elements required to calculate its value.

    When the transformation of an element from input to output becomes more than just a simple Move, or type conversion (xs:type), you can call on the full set of standard XPath 2.0 operators and functions to manipulate the data as required.

    The Graphical Data Map editor offers the XPath functions as transform types in the pick list as well as in the content assist, "Ctrl-space" when editing expressions and conditions.

  5. Define a conditional expression for each transform to determine at run time whether the transform is applied or not.

    For more information, see Defining an XPath conditional expression for a transform.

  6. Use structural transforms to enhance the readability and maintenance of your map. Use the transforms Local Map or Submap to group transforms that require the same condition to determine whether they are applied in a map at run time.

    At run time, if the condition evaluates to tue, you obtain similar performance results whether all the transforms are in the main map or grouped into nested maps that are associated with structural transforms.

    Other advantages when you use structural transforms are the following:
    1. You can define a conditional expression that determines whether a nested map is applied at run time. For example if a set of child fields should only be mapped dependent on some attribute of the folder, place them all inside an If transform. The nested map is executed when the condition evaluates to true.
    2. When you use a Local Map transform, you can convert the map to a submap if the need for reuse comes at a later stage. You can use an action in the Graphical Data Mapping editor to re-factor the Local Map into a Submap.
    3. You can use the Auto map wizard to automatically create Move transforms from input to output elements based on some correlation of the names of input and output elements to create mappings.

    For more information, see Using nested maps.

  7. When you need to process data, rather than just move it from source to target, use custom transforms to define specialized transformations.
    1. Custom XPath
    2. Custom Java

    From a performance point of view, it is recommended that you use XPath transforms or the Custom XPath transform as your first choice, then Custom Java.

Copyright IBM Corporation 2013Copyright IBM Corporation 2012.

Task topicTask topic | Version 1.0 | cm28400_