Using map automation

Map automation allows you to create maps automatically between business objects with similar attributes. You can also generate reverse maps for any given maps.

This section covers the following tasks:

Creating maps automatically

Map Designer Express can generate maps automatically between business objects having source and destination attributes with the same names. Even if the business objects are different, they may have certain elements in common. For example, a customer business object usually has the attributes First name, Last name, Address, and Zip code to maintain customer data.

To map business objects automatically, Map Designer Express looks for attributes with matching names between the source and destination business objects and uses a Move transformation. The mapping happens only at corresponding levels, that is, the top-level attributes in the source business objects are mapped with the top-level attributes in the destination business objects, not any other level. Similarly, the child business objects on the source side are considered for map automation only if corresponding child objects are found in the destination business objects at the same level.

Steps for creating maps automatically

Before you begin: You need to have a map definition file with the source and destination business objects specified. For information on creating a new map definition file with the New Map wizard, see Steps for creating the map definition.

Perform the following steps to create maps automatically:

  1. From the Tools menu, select Automatic Mapping.

    Result: The Automatic Mapping dialog appears, giving you the ability to provide a prefix or suffix for Map Designer Express to use for searching attributes.

    Figure 30. Prefix and Suffix Setting dialog
  2. To use this option, do the following in the Automatic Mapping dialog:
    1. Select the check box Add Prefix or Suffix to attributes during search.
      Note:
      This option is disabled, by default.
    2. Select Prefix or Suffix; and in the space provided, type a prefix or suffix to add to the search string for the particular session.

      Restriction: At any given instance, the choice can only be a suffix or a prefix. You cannot use both at the same time for searching.

    3. Click OK.
      Note:
      Map Designer Express will also use the preferences you have set for case and data types in the Automatic Mapping tab of the Preferences dialog.
      Figure 31. Automatic Mapping tab in Preferences dialog

      For information on setting these preferences, seeSpecifying Automatic Mapping .

Result: Map Designer Express will perform a search on every attribute on the source side with the prefix or suffix added to the search string on the destination side. Every time a matching attribute is found on the destination business object, automatic mapping will take place between the source attribute and the prefixed destination attribute.

Example of automatic mapping

The following illustration of automatic mapping includes adding a prefix.

Suppose a source business object has the following attributes:

  1. FirstName
  2. LastName
  3. Address
  4. Zip

The destination business object has these attributes:

  1. ORCL_FirstName
  2. ORCL_LastName
  3. ORCL_Address
  4. Pin
  5. State
  6. Country

In the Automatic Mapping dialog, we select the check box Add Prefix or Suffix to attributes during search. We type ORCL_ in the Prefix space and click OK.

Note:
This example presumes we have previously set the preference to Ignore Case in the Automatic Mapping tab of the Preferences dialog to perform a case-insensitive search on the names.

Result: Map Designer Express performs a case-insensitive search on the attributes on the source side (FirstName, LastName, and Address) with the prefix ORCL added to the search string on the destination side (ORCL_FirstName, ORCL_LastName, ORCL_Address). Every time a matching attribute is found on the destination business object, automatic mapping takes place between the source attribute and the prefixed destination attribute using a Move transformation. In our example, the mapping will occur between FirstName and ORCL_FirstName, LastName and ORCL_LastName, Address and ORCL_Address. The other attributes do not match up, so no mapping takes place between them.

Figure 32 illustrates this example.

Figure 32. Example of adding a prefix in automatic mapping

Creating reverse maps automatically

Typically, maps are used in pairs. In most places where a map is used, a map is also needed in the opposite direction. Using Reverse Map, automates the steps required to create a reverse map. The following table shows the standard transformation rules that Map Designer Express currently supports (Current map column) and the transformation rules that Reverse Map currently includes (Reverse map column).

Table 20. Transformation rules used for current map to reverse map
Current map Reverse map
Move Move
Split Join
Join Split
Set Value No mapping
Custom No mapping
Cross-Reverence No mapping
Submap Submap if there is one

As Table 20 shows, reverse mapping presently includes the Move, Split, Join, and Submap transformations. The Set Value, Cross-Reference, and Custom transformation rules are left untouched during a reverse map creation.

Restriction: For a Join to Split reverse mapping to take place delimiters must be provided. For a Split to Join reverse mapping, however, delimiters are optional.

Steps for creating reverse maps automatically

Perform the following steps to create a reverse map automatically.

  1. Open the map for which you need a reverse map.
  2. From the Tools menu, select Reverse Map.

    Result: The Save As dialog appears.

  3. Type a name for the reverse map and click Save.

    Result: Map Designer Express creates a reverse map for the currently open map and opens the reverse map in a new instance of Map Designer Express.

Example of reverse mapping

The following example shows a before and after map reversal scenario.

Figure 33 shows a map that needs a reverse map. It uses the Move, Custom, Join, Split, and Set Value transformations.

Figure 33. Map that needs a reverse map

After you perform the steps for automatically creating a reverse map (see Steps for creating reverse maps automatically), the following map opens.

Figure 34. Map created automatically as a result of reversal

As you can see in Figure 34, the Move transformation becomes a Move again in the reverse map. The Split and Join transformations are reversed. The Custom (Pay) and Set Value (Shift) transformations are left untouched. You need to do these manually with Activity Editor. The transformations that cannot be made in the reverse direction will be listed as warnings in the output window.

For information on using Activity Editor, see Customizing a map.

Using synonyms for automation

To enhance the basic matching process, you can create multiple synonyms for an attribute name. For example, you can match an attribute name not only with one matching name but also with several possible equivalent names.

Example: Suppose we have a CR as an attribute name on the source side. It could be matched to the following attribute names on the destination side:

You add these synonyms at the project level in the Synonyms window of System Manager. You can edit the entries here and add more comma separated strings to help in map automation. You can also create global synonyms that apply to all the business objects in the project.

For the procedure for creating synonyms for map automation in System Manager, see the System Implementation Guide.

System Manager will search for all the synonyms for a given attribute and perform automatic mapping when it finds the matches. For example, a CR on the source side will match up to Defect, Change request, Bug number, and CR if you have added these as synonyms in the Synonyms window. When any of these words is encountered, a mapping will be performed automatically.

Copyright IBM Corp. 2004, 2005