Deploying the changed rules

Once you are satisfied that the changes to the rules have the intended effect on code generation, the last step is to deploy the rules to the .jar file that Rhapsody® uses when it performs customized code generation.

About this task

To deploy the changed rules:

Procedure

  1. In RulesComposer, select File > Export.
  2. For the export destination, select RulesComposer > Deployable RulesComposer configuration.
  3. Click Next.
  4. For the export directory, select <Rhapsody installation path>\Share\CodeGenerator\GenerationRules\LangC\CompiledRules
    Note: By default, the .jar file containing the existing rules (RiCWriter.jar) is read‑only. Make sure to change this attribute before attempting to export the updated rules.
  5. Under Export Options, select Deploy JAR file.
  6. Click Finish. The new rules are as RiCWriter.jar.
    Note: Rhapsody looks for the compiled rules in the filename given for the C_CG::Configuration::GeneratorRulesSet property. The default value for this property is $OMROOT\CodeGenerator\GenerationRules\LangC\
    CompiledRules\RiCWriter.classpath
    .
  7. To implement the rules in the updated .jar file, you must close and then re‑open Rhapsody after you have exported the .jar file.