Rhapsody properties

Every model element in Rational Rhapsody has a set of properties associated with it which can be accessed through the Features window.
These properties can be used in your generation rules by calling method ModelElement.getProperty

While the properties can be read on the fly by the Rhapsody On-Demand connector reader, these properties must be preloaded with the Rhapsody Application connector reader.

Some properties not declared in Rhapsody but useful for code generation ruleset are automatically added by each connector reader, these properties are presented in a specific page.

Read Rhapsody properties with the connector reader "Rhapsody Application"

But the connector reader Rhapsody Application which is available under RulesComposer and RulesPlayer Helper (see tutorial), does not read automatically the whole list of properties to avoid overloading the system.

You have to specify which properties you would like to have for which model element type. The location for specifying these properties is in a file called Properties.ini.

Syntax of the file: Properties.ini

The syntax for each line in the file is :
{rhapsodyMetaClass}.{propertyName}

Lines starting with a '#' are ignored (= comment).

Some examples :

Class.CG.Class.Concurrency
Class.CG.Class.FileName
Actor.CG.Class.Concurrency
Attribute.CG.Attribute.IsConst

Wildcards can be used as well. The format is {rhapsodyMetaClass}.{Optional Category}.{Optional Metatype}.

Some examples :

Class..
Actor.CG.
Actor..Class

The 1st example above returns all properties available on a class.
The 2nd example returns all properties in the CG category for an actor.
The 3rd example returns all properties for an actor with the metatype of the property specified as "Class" in all categories. Note that 2 periods must exist when using this format.

Using the file: Properties.ini

This file should be declared in the RulesComposer launch configuration when you launch the ruleset under RulesComposer (See tutorial).
This file should be located in the same sub-directory as your deployed ruleset if you invoke it using .classpath file (See Deployment).
This file could be located too at root path inside the .jar file of your deployed ruleset.

However, if you invoke the deployed ruleset using the .launch file, the properties' file used is one declared in this configuration.