Deploy the Launch Configuration as single JAR file

The final step is to deploy the launch configuration that we have been executing so that Rational Rhapsody uses our generator.

Export the launch configuration

  1. Click File > Export...
  2. Open the RulesComposer folder, select Deployable RulesComposer configuration, and press Next.
  3. Choose the JavaGeneration launch configuration and press Next.
  4. Enter the location where to deploy the rules, click Deploy JAR file, and press Finish
  5. Note: If you wish to encrypt Jars, you can press button Advanced and check option Obfuscate rulesets and scripts.

Launch the configuration inside Rhapsody

Launch a Word© Document or Text file Generator Ruleset

If your ruleset declares only an single input model argument of type rhapsody and has some Text Template or Doc Template files to generate text files or Word© documents, please folow these steps:

  1. In Rhapsody, Open the project you want to associate this ruleset and select the active component
  2. right-click on this element and choose command Features....
  3. Set the properties shown below on the Configuration node in Rational Rhapsody so that RulesPlayer generator is used.
  4. Use menu command: Code > Generate... or Code > Generate... to invoke your ruleset.

Launch a Transformation Ruleset

If your ruleset further declares some output model arguments of different types including rhapsody, please folow these steps:

  1. Insert a new Helper for example JavaGeneration in menu Tools using Tools > Customize…:

    With Command =
    <rhapsodyInstallationDirectory>\Sodius\RulesComposer\bin\rp_launchconfig.bat

    With Arguments =
    C:\tmp\JavaGeneration\JavaGeneration.launch

  2. Use now menu command: Tools > JavaGeneration to invoke your ruleset.
  3. A black Windows command box is opened during generation, the progression is displayed in this window:

    Execute classpath: .\Rhapsody_Java_Sample.classpath
    Execute entry point: com.sodius.mdw.rhapsody.cpp.JavaGeneration.main
    Evaluation of JavaGeneration
    Reading Rhapsody On-Demand
    Generating .\DefaultComponent\DefaultConfig\class_0.java
    Code Generation Done
    Done.

  4. For details see tutorial.


Prev Section: Include a Javadoc template
Next Section: Use filenames associated to objects in Rational Rhapsody


Related reference
Deploying a launch configuration