Defining macros in requirements results in incorrect code generation in Rational Rhapsody
Attempts to define macros in requirements results in non expansion of macros in generated code in IBM Rational Rhapsody
Steps to reproduce:
- Launch Rational Rhapsody
- Add 2 Packages viz., Requirements and Design
- In Requirements package add some requirements viz., Req1
- In Design package add a class viz., Class1
- Add a constructor (under Class1) containing requirement viz.,Req2 and having a dependency to Req1
- 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)
- Set CG::Configuration::IncludeRequirementsAsComments property as Always in the property of the package
- Use the macro in the description template of the Requirement
- 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.
System-Service-Pack=Service Pack 3
Resolving the problem
No known workaround.