This sample transforms a UML model into a Relational model using an ATL module, and then generates SQL table creation scripts.
|
Here is an example of a UML transformation launch configuration:
Feature | Example | Location | Reference |
Calling an ATL module from a rule | ATLRunner(asmModule, sourceModels, targetModels) |
UML2Relational.mqr |
ATLRunner class |
Using subrules | rule main::addUniqueIDKeys() |
UML2Relational.mqr |
rule |
Creating an instance | target.create("Column") |
UML2Relational.mqr |
Model APIs |
Filtering a list of instances based on a criterium | relationalModel.getInstances("Type").detect("name", "documentation") |
UMLConvert.mqr |
MDWList |
Calling a text template on an ATL output model | $GenerateSQL(target) |
UML2Relational.mqr |
template call |
You should have the following result (see the report view to get the avaible outputs, generated files and output models) :