As Table 2 shows, a map is a two-part entity, consisting of a map definition and a run-time object.
You define a map to the map development system with a map definition. Map definitions are stored in projects in System Manager. The Map Designer Express tool provides dialogs to assist in the creation of the map definitions (often referred to simply as maps). It also handles storing the completed map definition in projects in System Manager.
For more information on how to use Map Designer Express to create map definitions, see "Creating a map: Basic steps"..
The map definition provides the following information about the map:
A map definition is simply a template or description of the map. It provides information on how to transform attributes of one business object to another. Therefore, the name of the map definition should identify the direction of the map and the business objects it transforms.
Maps consist of one or more source business objects and one or more destination business objects. The source business objects are the ones to be transformed; the destination business objects are the ones that are generated with data from the source business objects.
The rest of the map consists of a series of transformation steps. A transformation step is a segment of Java code that returns the value of a destination attribute. A map contains one transformation step for each destination attribute that is transformed. Transformations are implemented as Java code and are therefore stored in a Java source (.java) file.
Table 2 shows some of the transformations you can perform on a destination business object. Standard transformations include Set Value, Move, Join, Split, Submap, and Cross-Reference. You can create custom transformations with graphical function blocks.
Table 2. Transformations of a map
Transformation | Description | For more information | |
---|---|---|---|
Standard transformations | Transformations for which Map Designer Express can autogenerate code | ||
Set Value | Specifying a value for a destination attribute | "Specifying a value for an attribute" | |
Move (Copy) | Copying a source attribute to a destination attribute | "Copying a source attribute to a destination attribute" | |
Join | Joining two or more source attributes into a single destination attribute | "Joining attributes" | |
Split | Splitting a source attribute into two or more destination attributes | "Splitting attributes" | |
Submap | Calling a map for a child business object | "Transforming with a submap" | |
Cross-Reference | Maintaining identity relationships for the business objects | "Cross-referencing identity relationships" | |
Custom transformations | Creating a transformation other than one of the standard transformations listed above | "Creating a Custom transformation" |
When a clear correspondence exists between the source attribute and destination attribute, the transformation step simply copies the source value to the destination attribute. Other transformations can involve calculations, string manipulations, and data type conversions.
Figure 2 illustrates some
typical kinds of attribute transformations:
Figure 2. Typical attribute transformations
As Figure 2 shows, attributes from the source business object are typically:
For simple transformations such as copying a value into an attribute, splitting a value into two or more attributes, or joining two or more values into one attribute, you can specify the step graphically and Map Designer Express generates the Java code. For more complex transformations, you can customize the transformation with a graphical editor.
The map definition is a template for the run-time instantiation of the map, the map instance. During map execution, the Map Development system creates instances of the map based on the map definition and the transformation code.
Each map instance provides the following information:
For more information, see "Understanding map execution contexts"..