The Model Driven Software Network

Raise your level of abstraction

I use tagged values for providing downstream hints to general components/templates about how to perform.
An example might be when I am generating an Explorer-style interface, I want different Business Classes to appear differently in the tree.
For instance, I might want customers to be under a node containing the first letter of the company name.
I might want orders grouped into grouped into weekly folders.
Sales areas aren't grouped at all say, just listed under a Sales Area Node which is under a Housekeeping node.

This is an example of using tagged-values for holding configuration items for a general tree-component.

Does anyone else use UML tagged values and if so, what for?

Views: 275

Reply to This

Replies to This Discussion

Tagged Values are part of the UML standard so it is in the model itself. See the attached UML image.

The diagram part of the model attempts to be
business-focused => jargon-free => platform-independent => PIM
Note also the data-types are Date, temperature, URL...

In OMG-speak, the tagged values are acting as the platform-specific elaboration (PSM). In my head, I tend to think of these as the problem-space and the solution-space.

The Explorer-tree is nothing to do with UML-elements except in so far as it picks up a set of configuration instructions at execution time. See the image of the running application.

I notice that in my screen shot, my other example of a tagged-value is 'IsCreatable=false'. This would be used by the run-time menu builder to know that it must not show a File/New/Observed Temperature option (because that function is completed by a manually written webservice-call that is outside the scope of the model).

I hope this clarifies it.
Attachments:
I think, one could add extra information into tagged values. Tagged values may also understood as properties of the model element. I play with the tagged values in the profile definition of FK a stereotype that is used to fully model foreign keys to solve an actual problem when reverse engineering a database schema.

So when I use an attribute FK>> A in Entity>> B, I am able to automatically define that `id` is the primary key for the current attribute A. I think that this also solves my modeling issue on how to enable reverse engineer database models where the foreign key not always points to an `id` column as primary key and enabling multiple keys on the same classes. My currently published way how I reverse engineer database schemata is broken, because I put the FK column primary key name information into the aggregate definition as the name of the owned element uml:Property. Thus when having multiple aggregates from on table to another table I will become an UML model that has errors.

There is a profile from IBM describing how to model ER diagrams and thus database schema in UML. They additionally use a stereotyped operation to describe the foreign constraint, but I haven't seen, where they model the exact column name that is referenced for sample. Thus I am still a bit unsure about my way how to model the foreign key. But it is only a sample of using tagged values.

For my current understanding, when profiles are used I move from convention to definition, how things should be done. As of I define an attribute PrimaryKey with a default value of `id` in the class stereotype>> FK and let this class apply to the attribute of classes in the model, I could ensure, if I define an attribute to be a FK, I implicitly define what the primary key is, but I may change them if I want.

Using my current thinking on how to apply correct modeling for ER diagrams - with the tagged value automatically applied by the usage of the profile - I am also able to write equivalent XMI files in my reverse engineering step to get a proper UML model out of my database schema.

So I think, tagged values are very important, but one should think about the usage without a profile, because you could use any name for the tagged value. This leads probably to problems when applying XSLT templates that rely on proper defined tagged values. Sample: An enumeration could be used to reduce the values to select from. This would also decrease the chances of typos, because I select a predefined value from a list rather than typing the value.

RSS

Badge

Loading…

© 2019   Created by Mark Dalgarno.   Powered by

Badges  |  Report an Issue  |  Terms of Service