IBM Support

How to generate operation descriptions to implementation file from Rhapsody model

Question & Answer


Question

How do you generate operation descriptions to implementation file from IBM Rational Rhapsody model?

Cause

In Rhapsody versions prior to 8.0.3, the info added on operation [Description] tab can only be generated in specification files. It required extra efforts to make Rhapsody generate operation descriptions in implementation file so that it was not ideal for maintenance.

From Rhapsody ver 8.0.3 and later, the following new properties have been introduced in the tool.

  • [lang]_CG::Operation::GenerateDescriptionInImplementation
  • [lang]_CG::Operation::DescriptionInImplementation

These properties provide the mechanism to allow you having the operation comments easily and generating in implementation file as well.

Answer

You have three options to accomplish this task.

  • In the details, set [lang]_CG::Operation::GenerateDescriptionInImplementation = UseSpecificationText

    Then the text added on [Description] tab is used as operation comments for both specification file and implementation file.

    Example:

    image


  • If using [lang]_CG::Operation::DescriptionTemplate instead, the same user-keywords which appear in specification description would be generated in implementation file as well.

    Example:

    image


  • You can also provide a different comment for implementation file by using [lang]_CG::Operation::DescriptionInImplementation property.

    Example:

    image

Note: During roundtripping, any changes made to the comments on implementation file that precedes the operation definition are ignored. You can also check the corresponding information for Generating operation descriptions in implementation files at IBM product info center.

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21642601