Getting Started with M2M SDK
The chapter gives examples of how to create, set-up and execute a model transformation created using M2M SDK.
This chapter describes the creation, setup and execution of a model transformation created with M2M SDK on the basis of an example which an interface is generated in from a class.
Prerequisites
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
- Create an action in the C# Software Modeling profile for a model transformation's configuration. Enter the $INODIR/java/M2MSDK/configuration/de/customer/Options.xml option file as the path. You require the Configurator user role for this. Set the localized name to C# from Analysis.
- Create an action sequence in the C# Software Modeling profile for the Mapping editor. Enter the $INODIR/java/M2MSDK/configuration/de/customer/Options.xml option file as the path. You require the Software Architect user role for this.
- Edit the model transformation's configuration.
- Define a model transformation.
- Use the Map root template and name the step "Map Model".
- Search for syntax errors.
- Edit the parameter value at both places for expression and set the Property("type")="MEModel" value
- Use the Map root template and name the step "Map Component".
- Search for syntax errors.
- Edit the parameter value for expression and set the Property("type")="CLComponent" value
- Set the value for the step parameter to Map Model or Map Component respectively.
- Set the value for the createTemplate parameter to <MEPackage>C#::C#Namespace::*::*.
- Use the Map root template and name the step "Map Class".
- Search for syntax errors.
- Edit the parameter value for expression and set the Property("type")="CLClass" value
- Set the value for the step parameter to Map Component.
- Set the value for the createTemplate parameter to <MEPackage>C#::C#Class::*::*.
- Save your changes.
Executing Model Transformation
How to proceed
-
Select the Analysis model.
-
Select Extras>Map Model>Mapping>C# from Analysis.
The Mapping editor opens.
-
Select C# Design as the target model.
-
Select Mapping>Map Model>Execute.
Two interfaces and a package are created.
