Add Enumeration Elements to UML Profiles

Return to Introduction  Previous page  Next page

Enumerations can be used to restrict the values available to stereotype tags.

myProfile

Note: Enumerations defined under a Profile Package do not appear as elements in the profile when imported.

To add an enumeration element, follow the steps below:

1.Open your Profile Package child Class diagram.
2.In the Enterprise Architect UML Toolbox, select More tools | UML | Profile. The contents of the Profile page of the Toolbox display.
3. Drag an Enumeration item from the toolbox onto the diagram. If the Properties dialog does not display, double-click on the element on the diagram.
4.In the Name field, type the name of the new Enumeration.
5.Click on the Details tab and click on the Attributes button. The Attributes Properties dialog displays..
 
EnumTag
 
6.In the Name field, type the name of the Enumeration attribute.
7.In the Type field, click on the drop-down arrow and select the appropriate type.
8.In the Initial field, type the initial value of the attribute.
9.Click on the Save button, and repeat steps 6 to 9 for additional attributes.
10.When you are finished, click on the Close button.
11.Right-click on the Stereotype element and select the Attributes context menu option. The Attribute Properties dialog displays for the stereotype.
12.In the Name field type a name for the attribute.
13.In the Type field type the name of the Enumeration element.
14.In the Initial field type the name of the first enumeration attribute you defined.
15.Click on the Save and Close buttons.

You have now generated a drop-down list for setting the value of the tag in the Tagged Values window.