Book a Demo

Author Topic: Multiple same-name tagged values in profile  (Read 4451 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Multiple same-name tagged values in profile
« on: May 27, 2020, 05:21:46 pm »
Hi all,


One annoyance with EA's metamodelling facilities is that there is (or was, that's the question) no way to get multiple same-named tagged values to work properly.

There are a couple of different ways of specifying that a stereotype should auto-create certain tagged values. In an element of that stereotype, the tagged values associated with the stereotype are shown in their own tab in the element's property dialog. The tab is named after the profile in which the stereotype is defined.

The problem arises when I need to create multiple instances of the same tagged value in an element. The profile model doesn't care about multiplicity on tagged value attributes or connectors (except that a connector that points to another stereotype will result in either a RefGUID or a RefGUIDList tagged value depending on the connector end's multiplicity). I can make my tagged value type available for manual addition, but adding the tagged value manually means EA does not show it in the same tab in the element's property dialog.

The question is: with the recent changes to the metamodelling facilities, is there now a way to allow multiple same-named tagged values added manually to be displayed in the profile-named tab in the property dialog?

TIA,


/Uffe
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Multiple same-name tagged values in profile
« Reply #1 on: May 27, 2020, 06:58:53 pm »
The question is: with the recent changes to the metamodelling facilities, is there now a way to allow multiple same-named tagged values added manually to be displayed in the profile-named tab in the property dialog?

I don't think so, and that is something that I could use as well.

Before v15 all tagged values (profile tags or non-profile tags) where treated equally, but now there is no elegant way anymore to handle multiple tagged values with the same name.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Multiple same-name tagged values in profile
« Reply #2 on: May 28, 2020, 08:27:17 am »
There is an option that has been around for a while. Not explicitly part of the metamodeling.

Start by defining the tagged value type.

Add it to your technology.

That will result in it showing in the new tagged value dropdown with a qualified name.

I don't know exactly when it happened, but if you select a qualified name that matches a tagged value of an applied stereotype EA will create an additional value for that existing property.
« Last Edit: May 28, 2020, 08:29:11 am by Eve »

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Multiple same-name tagged values in profile
« Reply #3 on: June 01, 2020, 10:16:20 pm »
I don't know exactly when it happened, but if you select a qualified name that matches a tagged value of an applied stereotype EA will create an additional value for that existing property.
But it doesn't display it with the others, which is what I asked about. I just tested this in 1528.

1) Define a tagged value type in your MDG source project. I used an enum type.

2) In a stereotype definition in one of the profiles in your MDG source project, add an attribute with the tag's simple name as specified in the UML Types dialog.
Optionally, place the tag in a tag group.

3) Generate the technology.

4) In a target project, create an element with the stereotype from step 2.
The tag will be created as part of the element's creation and will be shown in the element's properties dialog in a tab with the name of the profile. If you added a tag group in step 2, the tagged value will be sorted into the group.
(In the properties window, it's in the Element tab, in a node of a tree whose root is the name of the stereotype with sub-nodes for the tag groupings.)
The type definition will be correct, ie if you created an enum tag type, you'll see a dropdown with the enum values.

5) In either the properties dialog or the properties window, create a tagged value manually.
You will find an item in the Tagged Value [creation] dialog's Tag dropdown called <MDG ID>::<Tag name>. Select that.

6) EA creates a tagged value whose name is the listed qualified name and whose type definition is the same as in step 4.

7) In both the element properties dialog and the properties window, the manually created tagged value is shown with its qualified name in the Tags tab.
No tag groupings are applied.
t_objectproperties.Property (which holds the tagged value name) contain the simple name for the auto-created tagged value and the qualified name for the manually created one.

So no. It doesn't do what I asked.

What needs to change is for the properties dialog / window to recognize when a tagged value is to be displayed whose qualified name is the ID of the technology which contains the profile which defines the stereotype and, if the profile definition contains a tagged value with the same simple name, sort it into the same output group as the profile-defined one.

If no such match is found, the manually created tagged value should be presented in a tab (property dialog) or node (property window) named after the technology ID. That way you can see which tagged values are stereotype-defined (profile-name tab), which are created manually from a technology definition (tech-ID tab), and which are created from local definitions in the project (the default Tags tab).


/Uffe
My theories are always correct, just apply them to the right reality.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Multiple same-name tagged values in profile
« Reply #4 on: June 02, 2020, 08:29:45 am »
I don't know exactly when it happened, but if you select a qualified name that matches a tagged value of an applied stereotype EA will create an additional value for that existing property.
But it doesn't display it with the others, which is what I asked about. I just tested this in 1528.
Then something else is at play. That's exactly what should be happening.

t_objectproperties.Property (which holds the tagged value name) contain the simple name for the auto-created tagged value and the qualified name for the manually created one.
The qualified name being stored in the name tells me that for whatever reason EA didn't recognise the property as coming from your stereotype.

What needs to change is for the properties dialog / window to recognize when a tagged value is to be displayed whose qualified name is the ID of the technology which contains the profile which defines the stereotype and, if the profile definition contains a tagged value with the same simple name, sort it into the same output group as the profile-defined one.

If no such match is found, the manually created tagged value should be presented in a tab (property dialog) or node (property window) named after the technology ID. That way you can see which tagged values are stereotype-defined (profile-name tab), which are created manually from a technology definition (tech-ID tab), and which are created from local definitions in the project (the default Tags tab).
That would result in inconsistencies between the initially created properties and the subsequently created ones. Which is why it has more or less the same logic at time of creation to create the tag in the normal way.