Launch an external ruleset

After deploying a launch configuration you wish to execute it in IBM rational Rhapsody for all your own projects but you want invoke it without changing properties for each project.
You will find below a way to perform this operation.

You can add as many commands as necessary rulesets in Rational Rhapsody as follows:

  1. Click Tools > Customize...
  2. Press button New on top of Menu Content box and enter for example JavaGeneration.
     
  3. Choose type External program in Type box and select Show in Tools menu check box.
     
  4. In Helper parameters box, on line Command, press on right button to find location of DOS script rhp_generate.bat.

    You find this program at location:
    <rhapsodyInstallationDirectory>\Sodius\RulesComposer\bin\rhp_generate.bat

  5. On line Arguments1, paste the .launch file associated to your own ruleset with its full folder path:
    C:\tmp\JavaGeneration\JavaGeneration.launch

  6. Press now button OK and check that command JavaGeneration is appeared in menu Tools above Customize....

  7. You can now click on menu command Tools > JavaGeneration.
    During ruleset evaluation, Rational Rhapsody opens a temporary black window but generation result is always reported in Out tab.
Note:To avoid error during execution, ruleset main entry must contain only one input argument of type rhapsody, example:
 public ruleset Class2List(in rhp : rhapsody)

 You can launch rulesets in deployed mode that use only following metamodels:
  • rhapsody
  • matlab
  • simulink
  • excel, see "Rhapsody to Excel" sample
However:If you installed RulesComposer too, you can also use more:
  • metamodel ecore
  • metamodel uml13
  • metamodel uml21
  • metamodel stm43
  • metamodel tau
  • metamodel relational
  • metamodel autosar20 autosar21 autosar31, see installation
  • engine ATLRunner, see "Rhapsody to Relational" sample (Using ATL in RulesComposer)

1 To avoid error, the field Arguments can be left empty. In this case Rational Rhapsody should launch ruleset declared in:

  1. current project properties,
  2. default language properties,
  3. in file <rhapsodyInstallationDirectory>\Sodius\RulesComposer\mdw.ini,
    See values of properties project and scenario.

Prev Section: Customize filenames associated to Rational Rhapsody objects
Next Section: Import, run and deploy "Rhapsody to Excel" sample