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 ANALYZE attributes. The adapter supports link extraction from the original model based on the natural relation of the model elements and maintains their hierarchy.
The data access allows to restrict the resources that should be considered by the adapter.
Open the ANALYZE configuration with the ANALYZE 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:
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.
The Rational Rhapsody adapter allows for flexible artifact configuration to specify which artifacts ANALYZE 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 ANALYZE configuration with the ANALYZE 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. ANALYZE 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:
Example:
include elements if (
valueOf (metatype) == "IClass"
valueOf ("_name") contains "MY_PREFIX"
)
name valueOf ("_name") + " : " +valueOf (metatype)
map{
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 ANALYZE attributes. In this case the ANALYZE 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 ANALYZE configuration with the ANALYZE configuration editor, and add a new link type as described in section "Configuring a link type".
Supported keywords:
Example:
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.
The Rhapsody adapter supports selection propagation in both directions, but requires the manual installation of Rhapsody libraries into ANALYZE.
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 ANALYZE 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 ANALYZE opens Rhapsody anyway and selects the ancestor element that is closest to the element corresponding to the selected artifact in ANALYZE. 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 ANALYZE works as usual.