Tool Mentor: Creating Traceability Links in Rhapsody
This tool mentor shows how to create traceability links between requirements and model elements such as analysis and design artifacts within Rhapsody®.
Tool: IBM Rational Rhapsody
Relationships
Main Description

As has been noted in related tool mentors, you can create requirements in Rhapsody® or import them from requirements management tools (such as DOORS®) into a Rhapsody project. The principal reason for having requirements in Rhapsody's modeling environment is to facilitate easy creation of traceability links between them and analysis and design artifacts (such as use cases and classes).

There are many types of traceability links created between requirements and model elements, for example:

  • <<trace>> dependency which provides a generic link between the requirement and the model element
  • <<satisfy>> dependency which provides a satisfaction link. This dependency is part of the Systems Modeling Language (SysML) and requires that the SysML Profile be loaded into the Rhapsody project.

Creating Traceability Links in a Diagram

You can place requirements in any diagram in Rhapsody. Consequently, you can create traceability links in any diagram that displays the requirement and the model element to be linked. The following figure shows a class diagram with some classes in it. To add a requirement to this diagram, simply drag it from the browser

Class Diagram

To create traceability links between the requirement and a class, you use the Dependency relationship. This is available from the diagram toolbar.



Dependency Button
Class Diagram with Traceability


Once the dependency is created, you specify its type by selecting the appropriate stereotype in the Features dialog. You can create links between a requirement and other model artifacts (such as use cases) using the same method.

Creating Traceability Links in the Browser

You can also create traceability links from the browser.

  • Right-click on the model element (the analysis or design artifact that you want to link to a requirement) and select Add New -> Relations -> Dependency.
     
  • In the "Add Dependency" dialog, choose <<select>>
  • In the "Select Model Element" dialog, navigate to the requirement that you want to establish a link with.
  • The newly created dependency will appear in the list of dependencies under the selected model element.

Browser View with Trace

  • Use the Features dialog (invoked by right-clicking on the dependency in the browser and selecting Features) to set the appropriate stereotype.

Links created in the browser can also be displayed in diagrams. For this you drag and drop the linked items into the diagram and use the Layout -> Complete Relations menu to get the link drawn automatically.