Rational Rhapsody

The Rhapsody adapter allows to access elements from Rhapsody models and derive links between these elements. Properties of the original artifacts can be mapped to YT attributes. The adapter supports link extraction from the original model based on the natural relation of the model elements and maintains their hierarchy.

Data access

The data access allows to restrict the resources that should be considered by the adapter.


Open the YT configuration with the YT configuration editor, and add a new data access as described in section "Data accesses". Select Rational Rhapsody as data access type.

The configuration panel allows to define which files and folders the adapter should consider for data extraction.

Supported keywords:

  • resource – File filter pattern

Sample configuration for a single project :

resource "/model/*.rpy"
resource "/model/*.rpyx"

The example above will consider any .rpy file and any .rpyx file in the model folder.

Artifact type

The Rational Rhapsody adapter allows for flexible artifact configuration to specify which artifacts YAKINDU Traceability should import from the Rational Rhapsody data access. It also allows to define custom attributes and to map them to native Rhapsody element attributes.


Open the YT configuration with the YT configuration editor, and add a new artifact type as described in section "Artifact types". Select your previously-configured „Rational Rhapsody data access”.

The configuration panel allows to define which native Rational Rhapsody artifacts should be included, based on their metatype, stereotypes, package or attributes. YT artifacts can be any named Rhapsody element. The configuration language offers content assist to guide through the different options. In case no explicit configuration is supplied, all artifacts for the type in the scope of the data access are included.

Supported keywords:

  • != – „Not equals” operator to use within a condition
  • == – „Equals” operator to use within a condition
  • contains – Constraint for substring check
  • !contains –Constraint for substring check, with not contains logic
  • include element if – Starts an include expression. Artifacts will be included if they satisfy the conditions within the expression.
  • map – Starts a mapping block.
  • to – Defines the relation of a custom attribute to the value it is mapped to.
  • metatype – Access the metatype of an element.
  • name - Specifies the name of the artifact.
  • stereotype – Access the stereotypes of an element.
  • package – Access the containing package of an element.
  • valueOf – Starts a valueOf condition.


include elements if (
	valueOf (metatype) == "IClass"
	valueOf ("_name") contains "MY_PREFIX"
name valueOf ("_name") + " : " +valueOf (metatype)
	yt_metatype to valueOf (metatype)
	yt_stereotype to valueOf (stereotype)
	yt_package to valueOf (package)
	yt_description to valueOf (description)

The example above will load all elements that are of metatype "IClass" and where the "_name" attribute contains the "MY_PREFIX" string.
Please note that multiple conditions are implicitly linked by a logical AND .
The name of the artifact is set to the value of the "name" attribute followed by " : " followed by the "metatype" of the element.
Finally the map block is used to map attributes of the element to YT attributes. In this case the YT attribute yt_metatype is mapped to the metatype of the element and so on.

The Rational adapter allows to derive links based on the relation (association, containment, generalization) model elements have to each other.

Open the YT configuration with the YT configuration editor, and add a new link type as described in section "Configuring a link type".

  • For both ends A and B, select an „Rational Rhapsody artifact type”.
  • As data access, select your previously-configured "Rational Rhapsody data access"

Supported keywords:

  • derived links from – Starts a derive expression. Links will be derived from the following relations.
  • association – Recognize an associations as links
  • containment – Recognize containments as links
  • generalization – Recognize generalizations as links


derived links from association, generalization

The example above will derive links if there is an association between elements, or if the elements are generalizations of each other.


An artifact’s version is used for suspicious links validation. Artifacts of this type do not provide a version.

Selection propagation


The Rhapsody adapter supports selection propagation in both directions, but requires the manual installation of Rhapsody libraries into YT.

The necessary libraries are provided by Rational Rhapsody and are usually located at %UserProfile%\IBM\Rational\Rhapsody\<Version>\Share\JavaAPI\ after installation of Rational Rhapsody. The version number depends on your installed version of Rational Rhapsody.

rhapsody.jar has to be copied to INSTALL_PATH/plugins/com.yakindu.traceability.rhapsody.lib_<Version>/lib/ and rhapsody.dll has to be copied to INSTALL_PATH/plugins/com.yakindu.traceability.rhapsody.lib_<Version>/os/win32/x86_64/.

By default a dialog is shown the first time you double-click a Rhapsody artifact in YT which will help you install the files.

Selection propagation is supported with Rational Rhapsody 8.3.1 or newer.

We noticed that Rhapsody can’t load parts of the model when path lengths are too long (more than ~255 characters). In that case, Rhapsody adds a „(U)” for „unresolved” in front of the names of problematic elements and it doesn’t show any sub-elements. Selection propagation from YT opens Rhapsody anyway and selects the ancestor element that is closest to the element corresponding to the selected artifact in YT. Sometimes, you can manually load unresolved elements via the context menu (which can also cause Rhapsody to crash). If this is successful, selection propagation from YT works as usual.