Associating stereotypes with stereotypes in UML profiles

You can add stereotype associations to create links between stereotypes in a custom UML profile. After you apply the custom profile to a model and apply the stereotypes to model elements, you can associate the model elements with each other by using the defined roles in the profile.

About this task

Associating stereotypes with stereotypes in profiles is helpful because, when you apply custom profiles, you can change which UML relationships are valid in a specific domain. For models that have a custom profile applied, a customized item is displayed on the Palette, which you can use to easily create relationships between elements with the specified stereotypes. Before you can add a stereotype association, a profile that contains at least one stereotype must be open in the Project Explorer view.

Restriction: You can only associate stereotypes with stereotypes that are in the same UML profile.

To associate a stereotype with another stereotype:

Procedure

  1. In the Project Explorer view, expand a project that has a custom UML profile with one or more stereotypes.
  2. Expand the Profiles folder, expand the profile, right-click a stereotype; then click Add UML > Stereotype Association.
  3. In the Select Element window, select a stereotype for the association and click OK.

Results

Tip: You can also use a class diagram to create the association between stereotypes.
Restriction: After you create a stereotype association, you cannot change its type to a different stereotype.
Restriction: The aggregation of a stereotype association cannot be composite. Although composition is a tool in the Palette for creating class diagrams in a profile model, you cannot use it to associate stereotypes.

Feedback