Run the generation

We can now run the ruleset using a sample model:

  1. Click Run > Run Configurations...
  2. Select MDWorkbench in the left hand list of launch configuration types, and press New.
  3. Type com.sodius.mdw.samples.tutorial in the Project field.
  4. Click Rule in the Main element section.
  5. Type tutorial.java.JavaGeneration.main in the Main element field.
     
  6. Select an input UML model:
    1. Click on the model parameter (first line of the Parameters section) to display the model selection dialog.
    2. Click Recent model.
    3. Select UML 2.1\XMI - product21.xmi in the Recent model tree.

    4. Click OK.

  7. Click Run. The launch configuration should look like this:

MDWorkbench evaluates the ruleset using the specified models and prints messages in the Console view:

[progress] Evaluation of JavaGeneration.main
[progress] Reading XMI - C:\MDWorkbench\workspace\com.sodius.mdw.samples.tutorial\models\product21.xmi
[progress] Generating generated\IdentifiedElement.java
[progress] Generating generated\NamedElement.java
[progress] Generating generated\Customer.java
[progress] Generating generated\LineItem.java
[progress] Generating generated\Order.java
[progress] Generating generated\Product.java
[progress] Done.

Related tasks
Creating a launch configuration