Run the generation

We can now run the ruleset using a sample model:

  1. Click Run > Run...
  2. Select RulesComposer in the left hand list of launch configuration types, and press New.
  3. Type JavaGeneration 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 the Rational Rhapsody model:
    1. Click on the model parameter (first line of the Parameters section) to display the model selection dialog.
    2. Select Rhapsody and then Rhapsody On-Demand in the tree.

    3. Click OK.

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

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

[progress] Evaluation of JavaGeneration.main
[progress] Reading Rhapsody On-Demand
[progress] Reading Project : RulesComposer_Tutorial
...
[progress] Generating generated\Customer.java
[progress] Generating generated\Order.java
[progress] Generating generated\Product.java
[progress] Generating generated\LineItem.java
[progress] Generating generated\IdentifiedElement.java
[progress] Generating generated\NamedElement.java
[progress] Done.

Next Section: Inspect the generated files
Prev Section: Create a ruleset to launch the Java template

Related tasks
Creating a launch configuration