Creating a map: Basic steps

Map Designer Express provides a New Map wizard to assist you in creating a map definition. Follow these basic steps to create a new map:

  1. Create a new map file with the New Map wizard. Specify the project, the source and destination business objects, and the name for the new map. For help in running the New Map wizard, see "Creating the map definition".
  2. Set the verb for each destination business object. In most cases, destination business objects have the same verb as source business objects. You can also set the value of the verb always to be a specific value. For help setting the verb, see "Setting the destination business object verb".
  3. Specify the transformation steps for each destination attribute that you want to map. How you do this depends on what kind of transformation is required. For more information on specifying transformation steps, see "Specifying standard attribute transformations".
  4. Specify the comment for the destination attribute. Although this information is optional, it greatly improves readability of the map information in Map Designer Express. For more information, see "Setting comments in the comment field of the attribute".
  5. Save, validate, and compile the map. For more information on saving, see "Saving maps". For information on compiling, see "Compiling a map"..
  6. Test and debug the map. For more information on testing and debugging, see "Testing maps"..

Creating the map definition

Map Designer Express provides a New Map wizard to assist in the creation of a map definition. To create a map definition:

  1. Start the New Map wizard in any of the following ways:

    Result: Map Designer Express displays the first window of the New Map wizard.

    Figure 10. Welcome window of New Map wizard

  2. From the list box, select the name of the project for which you want to create the map.
  3. Select the business object you will use as the source business object for the map. You can select one or more source business objects by clicking in the Use column of each desired business object. Then click Next to continue.

    Figure 11. Selecting source business objects

    Tip: To locate a particular business object, enter its name in the Find field. The up and down arrows scroll through the business object list. Click Next to continue.

    The New Map wizard does not require that you specify the source business object. You can click Next without selecting the source business object to postpone specifying this business object definition. You can specify it at a later time in the map workspace of the Diagram tab. For more information, see "Creating the source and destination business objects".

    Note:
    If you add or delete a business object from System Manager, it dynamically updates the list of business object definitions.
  4. Select the business object type you will use as the destination business object for the map. You can select one or more destination business objects by clicking in the Use column of each desired business object. Then click Next to continue.

    Figure 12. Selecting destination business objects

    Tip: To locate a particular business object, enter its name in the Find field. The up and down arrows scroll through the business object list. Click Next to continue.

    The New Map wizard does not require that you specify the destination business object. You can click Next without selecting the destination business object to postpone specifying this business object definition. You can specify it at a later time in the map workspace of the Diagram tab. For more information, see "Creating the source and destination business objects".

    Note:
    If you add or delete a business object from System Manager, it dynamically updates the list of business object definitions.
  5. Specify the name to associate with the map.

    Figure 13. Saving new map

    Rule: Map names can be up to 80 alphanumeric characters and underscores (_). Map Designer Express does enforce some naming restrictions. For example, it does not allow certain punctuation symbols, such as a period, a left brace ([), a right brace (]), a single quotation mark, a double quotation mark, or a space in the map name.

    The New Map wizard does not require that you specify the map name. You can click Finish without entering the map name to postpone naming this map definition. When you save the map, Map Designer Express prompts you with the Save Map As dialog for you to specify the required map name. For more information, see "Saving a map to a project".

    Specify whether the map is an inbound or outbound map. This map role is needed for automatically generating relationship codes.

  6. Click Finish to save the new map definition with the specified source and destination business objects.

    Result: Map Designer Express displays the new map's information in its Diagram tab.

Creating the source and destination business objects

If you do not specify the map's source and destination business objects from the New Map wizard, you can specify them from either of the following:

From the Add Business Object dialog

You can add a source or destination business object to a map from the General tab of the Add Business Object dialog. You display the Add Business Object dialog in any of the following ways:

Through the General tab of the Add Business Object dialog, you specify the source and destination business objects. The General tab provides the following functionality:

From the map workspace

From the Diagram tab, you can add a source or destination business object to a map by dragging a business object definition from the business object browser onto the map workspace as follows:

Note:
A dotted-line boundary divides the left and right halves of the workspace and identifies the source and destination portions of the map workspace. Be sure to carefully drop objects in the appropriate place.

Figure 14 shows the source and destination business objects in the map workspace.

Figure 14. Defining Source and Destination business objects

Tip: Alternatively, you can create the source and destination business objects by right-clicking the business object in the business object browser; selecting Copy from the Context menu; then right-clicking in the map workspace and selecting Paste As Input Object or Paste As Output Object.

Map Designer Express creates a window, called a business object window, for the source and destination objects. The title bar of this window displays the business object instance name. For help interpreting the title bar of the business object window, see "Using generated business object variables and attributes".. The business object window for the source business object contains columns for the name and data type of each source attribute. The business object window for the destination business object contains columns for the name, data type, transformation rule (which identifies the transformation step), and an optional comment.

If you make a mistake by dragging the wrong business object or making it an output object instead of input, you can delete the object from the map workspace and try again. To delete a business object from the map workspace, you can either:

Setting the destination business object verb

The verb indicates how the system should process the business object's data. When a map executes, the system needs to know what verb to assign to each destination business object it creates.

If a map has only one source business object and one destination business object, the verb for the destination business object is usually the same as the verb for the source business object.

In this case, you need to copy the verb from the source business object to the destination business object (see Figure 14), by defining a Move transformation rule with the source attribute as the source business object's verb and the destination attribute as the destination business object's verb. For more information, see Copying a source attribute to a destination attribute.

Tip: You can also drag-and-drop the verb from the source business object to the destination business object to define the value of the verb.

If a map has a destination business object with a verb that is not found in the source business object, you need to set the verb to a constant value, by defining a Set Value transformation rule with the destination attribute as the destination business object's verb. In the Set Value dialog box, enter the constant verb value. For more information, see Specifying a value for an attribute.

Maps sometimes have more than one source or destination business object, and these objects can have several child business objects. In these cases, you must consider carefully which verb to assign to each destination business object. Some destination business objects might require some custom logic to set the verb based on the verbs of one or more source business objects.

Copyright IBM Corp. 2003