Defining Tagged Values for Model Elements
A tagged value is a combination of a tag and a value that gives supplementary information that is attached to a model element. A tagged value can be used to add properties to any model elements and can be applied to a model element or a stereotype.
This article demonstrates how to define either text or model type property tagged values for model elements.
You can start by creating a new class diagram and drawing the following class diagram.
After successfully creating the Order class, right-click on the class and select
Open Specification... from the pop-up menu. A
Class Specification dialog box is displayed.
Go to the
Tagged Values tab at the
Class Specification dialog box and click on the
Add button.
There are 2 options in the pop up menu there, if you want to add a text property to a model element, select
Text from the pop-up menu. A new tag row is created.
If you want to add a model element property to a model element, you can select
Model Element from the pop-up menu. A new tag row is created.
You can change the name of the tag by double-clicking on the
Name field and entering a new name.
You can also change the type of the tag from text to model element or vice versa. To change the type, click on the
Type field and select a type from the drop-down menu.
To specify a default value of the Tag, you can double-click the
Value field and enter a value (for the Text Tag type), or select from the drop-down list (for the Model Element Tag type). Click
OK button to close the dialog box.
Related Articles
Resources