LANSA Composer provides a read-only mapping "Rules" view of your Transformation Map.
To display the Mapping Rules for a Transformation Map, select the required item in the Transformation Maps list and select the Rules tab.
For more details about the Mapping Rules view, refer to the following headings:
Last Prepared versus Last Saved Mapping Rules
Customize the Mapping Rules View
Mapping rules are inferred from the Transformation Map definition. The Mapping Rules view simply provides an alternate way to visualise and document your Transformation Maps.
Therefore you cannot sensibly make use of the Mapping Rules view until you have at least partially completed your Transformation Map definition using the mapping tool. For information on editing your Transformation Map, please refer to:
The Mapping Rules view does not purport to be a complete representation of all aspects of a Transformation Map definition – the definitive representation of the map remains the view when the map is opened in the mapping tool (Altova MapForce). There are many aspects of a Transformation Map definition that are NOT reflected in the Mapping Rules view.
But the Rules view presents a "narrative" representation of the map that focuses on the data item mappings in a way that can sometimes be unclear for a complex map when viewing it in the mapping tool.
Last Prepared versus Last Saved Mapping Rules
You can choose between displaying the mapping "rules" for the Transformation Map as it was Last Prepared or as it was Last Saved:
The Last Saved tab can be useful when you are editing a complex map. Each time you make a significant change in the mapping tool, you can save your changes and then switch to LANSA Composer's Mapping Rules view and click Refresh to see the latest version of your map represented as inferred mapping rules.
Customize the Mapping Rules View
By default, the Mapping Rules presents a "narrative" view of the data items that are mapped to the output component(s) in your map.
For example, the following is the view of the shipped example ITUT_ORDERS Transformation Map in the mapping tool:
And this is the default (narrative) Mapping Rules view of the same map:
LANSA Composer allows you to customize the default view in several ways. To view and select the options, click the View button and then select the required option from the drop-down menu:
The options for customizing the Mapping Rules view are described under the following headings:
Show Narrative Rule, andShow Sources and Targets
Show mappings for intermediate components
Many of the mapping rules shown by the Mapping Rules view will be direct mappings from a source data item to a target data item.
Most of the mapping rules in the preceding illustrations are of this type. For example:
However, other mappings can be more complex, possibly involving the use of one or more functions, filters, if-else and other components. The penultimate mapping in the preceding illustrations provides a simple example of such a mapping:
In such cases, you will probably want to drill-down into the source side of the mapping to see the components and mappings used to derive it.
The Show source mapping trail view option allows you to do this. (You can also select the item and double-click it or press Enter.) When you select this option a separate window opens that displays all the components and mappings that contribute to the source side of the selected mapping.
Show Narrative Rule, and
Show Sources and Targets
By default, the Mapping Rules presents a "narrative" view of the data items that are mapped to the output component(s) in your map.
You can toggle between this "narrative" view and one that shows source and target data items in columns by using the Show narrative rules and Show sources and targets view options. (You can also press F7 to quickly toggle between these views).
Show mappings for intermediate components
By default, the Mapping Rules shows only the data items that are mapped to the output component(s) in your map.
Mappings applying to intermediate components such as functions, filters, if-else and other components are not shown in the main view (although they can be displayed for the selected item using the Show source mapping trail view option).
If you prefer, you can include the mappings applying to intermediate components in the main view by selecting the Show mappings for intermediate components view option. In the following illustration you can see that the mappings associated with the Function [multiply] are now included in the list:
Select the Show mappings for intermediate components view option again to uncheck it and revert to the default (output components only) view.
You can print the Mapping Rules by simply clicking the Print button.
When you print the Mapping Rules, note the following:
In other words, LANSA Composer will print the rules largely as you have them presently displayed.
You can save the Mapping Rules to a CSV (comma-separated values) file for further processing or analysis using the tool of your choice - for example, Microsoft Excel.
To do so, simply click the Save As button and then, in the Save As dialogue, specify the path and file name that you want to use for the saved rules.
When you save the Mapping Rules, LANSA Composer will save either the Last Prepared or the Last Saved rules, according to which Mapping Rules tab you are presently displaying.