Using ATL in MDWorkbench: UML to Relational

Overview

This sample transforms a UML model into a Relational model using an ATL module, and then generates SQL table creation scripts.

Launch configuration

 
Ruleset com.sodius.mdw.samples.atl.uml2relational.TransformAndGenerate
Rule main
Arguments
  • a UML input model (e.g. models/product13.xmi)
  • a Relational output model (e.g. models/relational.xmi)
  • Features demonstrated

    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

    Related tasks
    Using ATL in MDWorkbench