ibm Rational Rhapsody 7.5 — Creating a link

Associations Links A link is an instance of an association. In previous releases of Rational Rhapsody, you could link objects in the model only if there were an explicit relationship between their corresponding classes. An association line between two objects meant the existence of two different model elements: Љ An association between the objects’ classes Љ A link between the objects Rational Rhapsody separates links from associations so you can have unambiguous model elements for links with a distinct notation in the diagrams. This separation enables you to: Љ Specify links without having to specify the association being instantiated by the link.

Љ Specify features of links that are not mapped to an association. In addition, Rational Rhapsody supports links across packages, including code generation. To support this functionality, the default value of the property CG::Component::InitializationScheme was changed to ByComponent . Creating a link To create a link, there must be at least one association that connects one of the base classes of the type of one of the objects to a base class of the type of the second object. To create a link: 1. Click the Link tool. 2. Click the first object. 3. Click the second object. 4. If wanted, name the link and press Enter .

The new link is created in the diagram, and is displayed in the browser under the Link category. Note that you can drag-and-drop links in the browser to other classes and packages as needed; however, you cannot create links in the browser. The following figure shows links in an OMD. Note that links shown in dark green to distinguish them from associations, which are drawn in red. In addition, the names and multiplicity of links are underlined. Rational Rhapsody 565