Tagged Values are a convenient way of adding additional information to an element, beyond what is directly supported by UML. The UML specification 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. The combination of tag and value, however, is often referred to as a Tagged Value.
Enterprise Architect defines a Tagged Value Type, which constrains the possible values of a tag and can specify how a 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.
A Technology Developer can also create new structured Tagged Values, reference data Tagged Values and custom Tagged Values from predefined Tagged Value Types.
To quickly add Tagged Values to one of more elements, see Quick Start - Add Tagged Value to Elements.
The Tagged Values window
You can use the Tagged Values window to view and modify Tagged Values for a selected modeling item, either from the current diagram or in the Project Browser. It is a dockable window that you can use to:
|·||Assign a Tagged Value to an Item|
|·||Modify Tagged Values|
|·||Assign Notes to a Tagged Value|
|·||Perform advanced tag management|
These model components can use the Tagged Values window as a convenient way to quickly view and modify Tagged Values:
|·||Elements - display their own tags, along with any inherited values|
|·||Object Instances - display their own tags and those obtained from their classifier|
|·||Ports and Parts - display similar information to objects but show the Port/Part 'Type' instead of a classifier; tags are included for all parents and other structures of the Ports type|
|·||Attributes - display their own tags and those received from attribute type classifiers, with the inclusion of any inherited tags|
|·||Operations - display their own tags|
|·||Connectors - display their own tags|
When over-riding an inherited property, the system copies the tag from the parent down to the child element and sets the new value, leaving the original tag unchanged.
Tagged Values Toolbar Buttons
Using the buttons from the toolbar at the top of the Tagged Values window, you can add, edit, sort, delete and arrange the Tagged Values of model features.
From left to right, the button functions are as follows:
|·||Show in compartments - displays the Tagged Values in element compartments on diagrams|
|·||Sort and Show Alphabetically - sorts the current Tagged Values alphabetically for the element|
|·||New Tagged Value - adds a new tag, to which you assign a value|
|·||Edit Tagged Value Notes - opens a note in which you type an explanation of the purpose of the Tagged Value|
|·||Delete Tagged Value - removes the currently selected Tagged Value|
|·||Default Tagged Value Types - provides quick access to tag definitions created in the Project | Settings menu|
|·||Tagged Value Options - provides options to show or hide the fully qualified paths for the Tagged Values in the window, and to show duplicate Tagged Values|
|·||Help - displays information on the use of the Tagged Values window|
Learning Center topics
|·||(Alt+F1) | Enterprise Architect | Getting Started | Basic Tasks | Add A Tagged Value|