For each target-field mapping, the mapping editor remembers the XPath expression that can be used to find a field in the source or target structure. If the source or target structure changes, existing target-field mappings may become invalid because the mapping editor can no longer find fields in target-field mappings created prior to the structure change. This may be the case for the following reasons, for example:
● The name of an element has changed
● A new hierarchy level has been added to the structure of a data type
● A message mapping for a 1:1 transformation is to be enhanced for a m:n transformation (more information: Multi-Mappings)
A message-mapping target structure looked as follows in a previous release:
In the current release, the elements street, city and zip are to be reassigned to a new element address. The element name was also renamed:
The mapping editor only recognizes the old structure for the target-field mappings of street, city, zip and name that were defined in the previous release. If you do not want to have to define these target-field mappings again, you must replace the XPath expressions they contain.
In this case, the mapping editor displays a warning for all fields that it can no longer find. To replace the XPath expressions in the affected target-field mappings, in the mapping editor, choose Reload with Improvements ().
The Reload with Improvements () function is only visible in the mapping editor if at least field used in a target-field mapping could not be found when the message mapping was opened.
1. In the ES Builder, open the message mapping that references a changed source or target message. The mapping editor displays a warning for any fields in target-field mappings that can no longer be found.
2. Choose Reload with Improvements (). The mapping editor opens a dialog box in which you can replace the XPath expressions in the target-field mappings.
3. The mapping editor displays two XPath expressions in the upper part of the dialog box:
○ The XPath expression for the field that could not be found
○ The XPath expression of the next higher-level field
If the new structure has an additional hierarchy level, it may be easier to reset the path of the next higher-level field in all target-field mappings. By doing so, the path for the lower-level fields will be automatically correct and you do not then need to replace each one individually.
The following target structure was previously used for a 1:1 transformation:
Now it is to be used for a 1:n transformation. Consequently, you have changed the occurrence value for the target message on the Signature tab page from 1 to 0..unbounded. The structure of the target message now looks as follows:
In this case, you simply need to replace the XPath expression /PersonName with /messages/message1/PersonName in each case. These expressions are then automatically correct for the lower-level fields firstName and familyName.
Proceed as follows:
○ If you want to replace the XPath expressions at a later date, choose Skip All.
○ If none of the XPath expressions displayed can be replaced by an XPath expression in the new structure, choose Skip.
○ To reassign one of the XPath expressions displayed, first select it. In the structure that is displayed, select the field that you want to belong to the XPath expression selected above and choose Move.
4. If in the last step you have replaced numerous XPath expressions that use the same prefix, the XPath expressions that have already been replaced are displayed in the lower part of the mapping editor window.
The target-field mappings for fields whose XPath expressions you successfully reassigned are available again in the mapping editor. Check that the message mapping still functions with the new assignments.