IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Defining and transforming data > Transforming data > Transforming data using XML maps > Automatically mapping elements

Create and using a synonym file

You can create a synonym file manually, or by generating a synonym file from the information that is contained in a Microsoft Excel spreadsheet, using the following set of instructions.

The following set of instructions describes how to create a synonym file where the original mapping requirement is written in Microsoft Excel. If your original requirement is written in a table in Microsoft Word you must copy and paste the table into Microsoft Excel before you begin.

Amend the process to allow for extra facilities that your enterprise uses.


Procedure

  1. Select the section of the Microsoft Excel spreadsheet that you require.

    For example, if you have a Product that you want to map to a Part number, select that section of the spreadsheet.

  2. Remove all columns from the spreadsheet, except the ones containing the input field name and the output field name.

    You might have to edit some of the cells.

    For example, if your mapping instruction includes the phrase based on, remove this phrase.

  3. If the input or output fields contain paths, remove the paths to leave only the short names of the item.

    However, it is helpful to sort the column before removing the paths. Sorted path names can indicate which is the best input or output to select when invoking the action.

    If all the interested inputs (or outputs) start with the same path prefix, you might consider selecting the lowest input (or output) node in the tree which has that common path prefix.

  4. Remove all rows that do not have a input field name and an output field name.

    For example, if you have an obsolete product that no longer has a part number and you have put n/a in the input, remove that row.

  5. Select the Save As function in Microsoft Excel to save the spreadsheet into an acceptable format.

    You can use either a Tab delimited .txt file or a comma delimited .csv file.

    A comma delimited file can be opened using Microsoft Excel and it looks like the original Microsoft Excel file; the file can also be viewed using a text editor.

  6. Create the mappings using the synonym file.

    Select the options in the Auto map wizard that match your requirements; for example, select the default options of Map the immediate children of the selected elements and Alphanumeric characters (Letters and digits only).

    When you have chosen these options, select Create transforms when input and output names are matched to synonyms defined in a file.

    If you need to map same-name inputs to outputs, and the synonym file does not contain rows with those names (for example a row with car,car), you might want to check the Create transforms when the names of inputs and outputs are the same option, in addition to Create mappings between input and output names defined as synonyms in file option.

    For that matter, you can even check both Create transforms when the names of inputs and outputs are the same and Create transforms when the names of inputs and outputs are more similar than, in addition to Create transforms when input and output names are matched to synonyms defined in a file, if your synonym file does not contain a row color,colour and you want to map between them.

  7. Click Finish.
  8. Edit mapping expressions based on the requirement that you need.

    For example, if you have the following value:

    PRODUCT  $SOURCE/Batch/Detail/Replace/PartNumber
    edit the mapping expression to:
    xs:boolean($source/Batch/Detail/Replace/PartNumber = 1)

  9. Create all the mappings that the Map by Synonym process has not generated.

Automatically mapping elements


Related tasks:
Automatically mapping elements by name


Related reference:
Format of the synonym file