IBM Support

Defining macros in requirements results in incorrect code generation in Rational Rhapsody

Technote (troubleshooting)


Attempts to define macros in requirements results in non expansion of macros in generated code in IBM Rational Rhapsody


Steps to reproduce:

  1. Launch Rational Rhapsody
  2. Add 2 Packages viz., Requirements and Design
  3. In Requirements package add some requirements viz., Req1
  4. In Design package add a class viz., Class1
  5. Add a constructor (under Class1) containing requirement viz.,Req2 and having a dependency to Req1
  6. In the Rational Rhapsody model create a Macro with a value using the property CPP_CG::Requirement::Macro_Name
    (Note: This property has to be defined in the Rhapsody property file - site.prp)
  7. Set CG::Configuration::IncludeRequirementsAsComments property as Always in the property of the package
  8. Use the macro in the description template of the Requirement
  9. Generate code for Class1 and verify in Class1.cpp that the macros do not get expanded. It merely appears as plain text.


This issue was identified as a product defect and logged under APAR PM80547.


[Rhapsody Information]
Serial No:=9276595843891208
Edition:=Development Edition

[System Information]
System-version=Windows XP
System-Service-Pack=Service Pack 3

Resolving the problem

No known workaround.

Document information

More support for: Rational Rhapsody
General Information

Software version: 8.0

Operating system(s): Windows

Reference #: 1624065

Modified date: 01 February 2013

Translate this page: