Understanding Tagged Values
Sometimes, you may find the standard modeling notations are not enough in supporting your domain specific needs. For example, if you are working on a project that relies heavily on the use of third-party libraries, you might want to specify the API source of those components modeled in UML component diagram. And in business process modeling, you might want to record the locations where the tasks are performed. Usually, these kind of specific needs cannot be directly supported by the standard notations.
Fortunately, OMG Unified Modeling Language (UML) introduces stereotype and tagged values, which provide designers with ideal solutions to these situations. Stereotype and tagged values are kind of extensibility mechanisms that allow designers to extend the vocabulary of UML in order to create new model elements. With the use of stereotype and tagged values, designers can introduce model elements with domain/problem specific properties.
Starting from UML 2.0, tagged values are considered to be attributes of stereotype. Yet, Visual Paradigm supports to use tagged values independently, that is, to add tagged values directly to model elements as custom properties instead of prior attachment to any stereotype. Besides, Visual Paradigm allows you to take the advantage of stereotypes and tagged values in not just UML but all the modeling notations like BPMN and even in ERD, DFD, etc. Simply put with Visual Paradigm, you can add custom properties to any model elements by creating tagged values.
Adding user-defined tags
- Right click on the selected shape and select Open Specification... from the pop-up menu.
Right click to select Open Specification...
- In Specification window, select Tagged Values tab and click Add button to select the tag type.
Add an option of value type
Different types of tagged values
|Different types of tagged value
|NOTE:||The value of stereotype can be edited, however, its name and its type cannot be edited as they are defined in stereotype.|
Visualizing tagged values on diagram
Right click on the diagram background and select Presentation Options > Show Tagged Values from the pop-up menu.
|Show tagged values
If it is defined, the tagged values will be seen within the shape(s) on the diagram.
|Tagged values are shown
Creating default tagged values
Besides adding tagged values to model elements, you can make a tag as the default of certain model element type. This is an ideal solution for creating custom properties for model elements. For instance, you can create a default tag "API" to UML class. Then, when you create a class, the tag "API" will be added to the class automatically. You can then specify the tagged values of "API" of that class.
To create default tagged values:
- Select Configuration > Configure Default Tagged Values under the Window tab of the toolbar.
- Select the type of model element to be configureon on the left hand side.
- Click Add on the right hand side to select the tag type.
- Input the tag name and default value, if any.
- Click OK to confirm the changes.
|Added a tag "API" to class
The following resources may help you to learn more about the topic discussed in this page.
|6. Resource Centric Interface||Table of Contents||8. Spell Checking|