About mapping models

You can specify alternate file names for any of the files and folders that a transformation generates by creating a mapping model. You can specify alternate names if you want to include code-specific details such as naming restrictions in platform-specific models, or if the logical organization of the source model is not appropriate as target packaging.

To create a mapping model, the transformation that you configure must support mapping. If a default transformation in IBM DevOps Model Architect supports mapping, the transformation configuration editor displays a Mapping page. To enable mapping functionality for custom transformations, a transformation author must set the supports Mapping property equal to true. The transformation manifest file contains this property.

A mapping model has .emx as a file name extension.

A transformation assigns default file names to the files and folders that it generates. You can specify alternate file names for any of the files and folders that a transformation generates by creating a mapping model. Specifying alternate names in a mapping model does not modify the source model. You must create a mapping model in the same workspace as the selected model elements.

To create a mapping model, you must select the source model elements on which to run a transformation. The source model elements can exist in different models or different projects. When you generate a mapping model, a separate model is created that contains an artifact for each element that you select in the source model. A manifestation relationship exists between each created artifact and its corresponding element in the source model.

The transformation assigns a default name to each artifact which refers to, and has the same name as, the corresponding source model element. The File Name property of each artifact remains empty until you specify an alternate name by specifying one in a mapping model. You can specify a qualified name such as com.ibm.NewName.com or an unqualified name such as NewName. If you specify an alternate file name for a folder such as a UML package element, the change affects all resources that the transformation generates in that folder, unless the resource specifies a fully qualified name. You can also specify alternate locations in the same project for elements that the transformation generates.

The next time that you run a transformation using a mapping model, the alternate file names that you specify in the mapping model are applied to the elements that the transformation generates.


Feedback