This sample describes step-by-step instructions how to create profile migration mapping rules and perform transformation. In this sample we will change one stereotype to other.
- Create Book stereotype with Class metaclass.
- Create your model, for example, create Source package with Source Class diagram. Draw the Sample Class and apply the Book stereotype.
To change the Book stereotype to other, for example to Magazine stereotype, you have to create profile migration transformation mapping rules. Follow next steps for creating the mapping. - Create the stereotype Magazine with Class metaclass.
- From the Magazine stereotype to the Book stereotype draw Dependency relationship.
- Apply ReplaceStereotype stereotype to the Dependency relationship.
Profile Migration transformation mapping rule is created. Now you can start transformation. - To start the transformation, from the Tools menu, select Model Transformations. The Model Transformation Wizard opens.
- Select the Profile Migration transformation and click Next.
- Select the Source package in the Select source/destination step. Click Next.
- The From and To fields display the mappings of the selected transformation profile in the Check mappings step. Click Finish .
After this transformation stereotype of Sample Class will be changed to Magazine stereotype.