IBM Support

How to create custom Predefined Keywords in IBM Rational Rhapsody

Question & Answer


Question

How do you create custom Predefined Keywords in IBM Rational Rhapsody?

Cause

IBM Rational Rhapsody has a list of predefined keywords. These are limited in both number and scope. Using a combination of the Java API and Conditional Properties you can now create an unlimited number of custom keywords, holding any value you wish and use them with any property in your project.

Answer

This profile uses the Java API to add new properties to your project with the addProperty() method. You can retrieve any information from the project model - or your system in general - using the API to populate the values of these properties. The properties can then be used as "keywords" in any other project property using the conditional syntax:


?<IsConditionalProperty>$<Subject::Metaclass::Property>


for example:


?<IsConditionalProperty>//$<Model::Metadata::ComponentName>

To install:

  1. Unzip the attached file to your \Share\Profiles folder. For example: C:\Rhapsody8.1.2.1\Share\Profiles\NotEnoughProperties\bin
  2. Open your project and add the profile.

Disclaimer:

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

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

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21973545