For years I’ve used the tagged values within EA. However, for some reason I have always assumed that they were just used for strings and a few other basic types for storing numbers. However, this is not the case. As I was reviewing the user guide for some related information the other day, I was surpised but delighted to discover that there is so much more, with support for a much wider range of tagged value types, with some really useful functionality.
Without repeating the detail (that’s in the manual – “Tagged Value Types”) the support for types goes way beyond the basic string, integer and other number formats to much more complex and functionally richer items including:
- String based items (Directories, Filenames, URLs)
- Selection from Pre-defined reference data e.g. Authors, Phases, Roles
- Reference to element or elements within the model
- Custom Tagged Value types that are defined using a template and can help validate data entry
- and finally the ability to use an “AddIn” to respond to the tagged value broadcast event and hence provide an open ended ability to interprete what is stored, the actions etc
For these complex types suitable context sensitive dialogues are presented to support the setting of the tagged value. Furthermore, each of these types can be set to apply to element types and/or stereotypes – the screenshot below illustrates a range of different typed tagged values for an element; in this case a class.
Creating tagged values can be done using the “Settings |UML Types | Tagged Value Types” – remember to check the syntax in the user guide for specifying the “Type” , “Values”, etc – the following screenshot illustrates a tagged value that will reference a Requirement element which has a stereotype “test”.
Typed tagged values can also be created through templates or MDG – so a bit more reading to do on this when I need to use them.
As Tagged Values are stored as reference data they can be exported to /imported from other model. The screenshot below illustrates the menu selections used to export the data – note that a further dialog will appear where you select “UML Types | Property Types”
Now of course with this new knowledge I can immediately think if only I’d known about these before. In particular, in setting up a model for a project I’ve found it useful to preset tagged values to ensure consistency, and the wider range of types would have been really useful. Plus the ability to use an AddIn provides a means to “validate” actions, and much more.
Well this new found discovery just highlights how much exists within EA. And in case you haven’t clocked all this stuff before – check out the user guide section on “Tagged Value Types” – really worth a read!