Getting Started

The chapter gives examples of how to create, set-up and execute a model transformation created using M2M-SDK.

The aim is a model transformation which creates an interface from a class.

Requirements

You have created a model with the Software Architect for C# (en) template.

You have created two classes in the analysis model.

Creating Model Transformations

How to proceed

  1. Create an action in the C# Software Modeling profile for a model transformation's configuration. Enter the $INODIR/java/configuration/en/customer/Options.xml option file as the path. You require the Configurator user role for this. Set the localized name to C# from Analysis.
  2. Create an action sequence in the C# Software Modeling profile for the mapping window. Enter the $INODIR/java/configuration/en/customer/Options.xml option file as the path. You require the Software Architect user role for this.
  3. Edit the model transformation's configuration.
  4. Define a model transformation.
  5. Use the Map root template and name the step "Map Model".
  6. Search for syntax errors.
  7. Edit the parameter value at both places for expression and change the Stereotype("idname")=! value to Property("type")="MEModel".
  8. Use the Map root template and name the step "Map Component".
  9. Search for syntax errors.
  10. Edit the parameter value for expression and change the Property("type")=! value to Property("type")="CLComponent".
  11. Set the value for the step parameter to Map Model or Map Component respectively.
  12. Set the value for the createTemplate parameter to <MEPackage>C#::C#Namespace::*::*.
  13. Use the Map root template and name the step "Map Class".
  14. Search for syntax errors.
  15. Edit the parameter value for expression and change the Property("type")=! value to Property("type")="CLClass".
  16. Set the value for the step parameter to Map Component.
  17. Use the Map root template.
  18. Save your changes.

Executing Model Transformation

How to proceed

  1. Select the Analysis model.
  2. Select Extras>Map Model>Mapping>C# from Analysis.

    The Mapping editor opens.

  3. Select C# Design as the target model.
  4. Select Mapping>Map Model>Execute.

    Two interfaces and a package are created.

 

 

© 1986-2014 MID GmbH Nuremberg Germany. DIN EN 9001 certified. All rights reserved.