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.

  1. Create Book stereotype with Class metaclass.
  2. 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.
  3. Create the stereotype Magazine with Class metaclass. 
  4. From the Magazine stereotype to the Book stereotype draw Dependency relationship.
  5. Apply ReplaceStereotype stereotype to the Dependency relationship.
    Profile Migration transformation mapping rule is created. Now you can start transformation.
  6. To start the transformation, from the Tools menu, select Model Transformations. The Model Transformation Wizard opens.
  7. Select the Profile Migration transformation and click Next.
  8. Select the Source package in the Select source/destination step. Click Next.
  9. 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.

Profile Migration Transformation mapping