Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Tagged Values
What is a Tagged Value?
Tagged Values are a convenient way of adding additional information to an element, in addition to that directly supported by UML. UML provides the Tagged Value element for just this purpose. Often Tagged Values are used during code generation or by other tools to pass information or operate on elements in particular ways. Tagged Values are the preferred method of extending the code generation capabilities of the modeling tool per element, per language.
A Tagged Value, strictly, is the value of a property of a modeling item, the property being called a tag. For example, a Class element called Person might have a tag called Age with the Tagged Value of 42. More loosely, the combination of tag and value can be referred to as a Tagged Value.
A Tagged Value Type is a group of parameters that define and/or limit the possible values of a tag and, in many instances, how a specific value is assigned to the tag. For example, the tag Age might have a Tagged Value Type of Integer, so the user simply types in a numeric value. Alternatively, the type could be Spin, with lower and upper limits of, say, 20 and 120, so the user sets a value by clicking on arrows in the field to increment or decrement the value within the limits of 20 and 120.
To quickly add Tagged Values to one of more elements, see the Quick Add - Tagged Value to Elements topic.
The Tagged Values Window
The Tagged Values window is used to view and modify Tagged Values for the currently selected modeling item, either in the current diagram or in the Project Browser.
The Tagged Values window is, by default, set to hide fully qualified values (which show exactly where the Tagged Value came from) and duplicate values, as in the first window below. If you prefer, you can change the settings to show duplicate values and fully-qualified values, as in the second window below:
Note: |
Fully qualified Tagged Values can be displayed only if the Tagged Value was created in Enterprise Architect release 7.1 or later. You cannot display the fully qualified path for Tagged Values from earlier releases. |
The Tagged Values window is a dockable window. You can use it to perform the following actions:
- Assign a Tagged Value to an Item
- Modify Tagged Values
- Assign Notes to a Tagged Value
- Perform advanced tag management.
A Technology Developer can also create new structured Tagged Values, reference data Tagged Values and custom Tagged Values from predefined Tagged Value Types.
Model Elements and Features with Tagged Values
The following model components can use the Tagged Values window as a convenient way to quickly view and modify Tagged Values:
Component |
Description |
Elements |
Elements display their own Tagged Values along with any inherited values. |
Object Instances |
Object Instances display owned tags and those obtained from their classifier. |
Ports and Parts |
Ports and parts display information similar to objects and display Port/Part 'Type' instead of a classifier. Tags are included for all parents and other structures of the Ports type. |
Attributes |
Include owned Tagged Values and those received from attribute type classifiers, with the inclusion of any inherited ones. |
Operations |
Owned properties only. |
Connectors |
Owned properties only. |
When over-riding an inherited property, Enterprise Architect copies the tag from the parent down to the child element and sets the new value, leaving the original tag unchanged.
To edit Tagged Values, use the Tagged Values toolbar, as described below.
Tagged Values Toolbar Buttons
The buttons in the Tagged Values toolbar enable you to add, edit, sort, delete and arrange the Tagged Values of model features.
From left to right, the button functions are as follows:
- The Show in compartments button displays the Tagged Values in element compartments on diagrams
- The Sort and Show Alphabetically button sorts the current Tagged Values for the element alphabetically
- The New Tagged Value button adds a new tag, to which you assign a value
- The Edit Tagged Value Notes button enables you to create notes that explain the purpose of the Tagged Value
- The Delete Tagged Value button removes the currently selected Tagged Value
- The Default Tagged Value Types button enables quick access to tag definitions created in the Configuration menu
- The Tagged Value Options button enables you to show or hide the fully qualified paths for the Tagged Values in the window, and to show duplicate Tagged Values
- The Help button displays help relating to use of the Tagged Values window.