Author Topic: Redefinition - TAGGED VALUES CRAZY ISSUE  (Read 3375 times)

Greg_PL

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Redefinition - TAGGED VALUES CRAZY ISSUE
« on: February 20, 2025, 12:53:17 am »
Hi,

 I'm so confused... Here is my case:

I have build MDG with ArchiMate app component redefinition (all done inline with instructions, not first MDG in my life ;) ). I've added number of tagged values AND:
1. I see them all element properties ONLY when I manually change element's stereotype (from any to my MDG one)
2. I see only part of all tags when I drag component from default ArchiMate toolbox... Stereotype looks fine, most of tags is on place... BUT some of them are not there!
3. To make it more funny: I see all tags of this element in... Prolaborate. In EA not.

Please help me....

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefinition - TAGGED VALUES CRAZY ISSUE
« Reply #1 on: February 20, 2025, 03:09:11 am »
check t_objectproperties.

What probably happens is that your elements already had some of the tags before.
Now EA is a bit strange, in that sense that all tagged values that belong to a certain steroetype all have a similar GUID (the first part is the same IIRC)

Now if your stereotype defines tag "A", and you already had a tag with the name "A" in your element, these tags end up somewhere in between.
They are not shown on the properties because they have the wrong guid, and they are not shown at the tags, because they are defined in the stereotype.

What you need to do when converting elements is

- delete all tags that are defined in your stereotype (but remember their value)
- apply the stereotypeEx and update
- refresh the tagged values
- fill in the values of the old tags into the new tags

Geert

Greg_PL

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Redefinition - TAGGED VALUES CRAZY ISSUE
« Reply #2 on: February 20, 2025, 04:00:33 am »
Tahnks Geert! Can always count on you ;).

What I may not catch is the "converting" instructions. Do you mean creating a "raw" MDG (wothout TAGS) and publish it in model? And then add all tagged values back to the redefined stereotype in MDG Profile (generate + publish again)? What is "refreshing" tagged values?

OR you mean something like mass re-stereotyping them (all elements in repo) via script and then fill in all tags from xls (via script as well...).

Greg
« Last Edit: February 20, 2025, 04:03:10 am by Greg_PL »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefinition - TAGGED VALUES CRAZY ISSUE
« Reply #3 on: February 20, 2025, 04:21:56 am »
I'm not sure I have it correct, but I recognize this type of situation from when I introduced an MDG in a model where we had added "loose" tags in the past.

When trying to convert all elements, including their tags, we had similar issues; tags that didn't show up.

After investigation we found that in fact the old tags had not been deleted, but the new one's weren't created correctly.

I then corrected the script to first delete the old tags, and only then apply the new stereotype

Geert

Greg_PL

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Redefinition - TAGGED VALUES CRAZY ISSUE
« Reply #4 on: February 20, 2025, 05:10:16 am »
Got it... So you suggest to flush all t_obcjectproperties records where Property field equals my TAG name?... I'm not sure if I'm able to do it.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Redefinition - TAGGED VALUES CRAZY ISSUE
« Reply #5 on: February 20, 2025, 05:47:45 am »
Got it... So you suggest to flush all t_obcjectproperties records where Property field equals my TAG name?... I'm not sure if I'm able to do it.
No, use a script to delete the tagged values EA.Element.TaggedValues.DeleteAt(), before applying the correct stereotype.

Before deleting you can record the values in a dictionary.
When you save the element with the correct stereotype, the tagged values will be recreated.
If the element already has the stereotype, you might need to remove the stereotype, update() and then set the StereotypeEx, and update() again.
After saving the element, you can then update the new tagged values based on your saved values in the dictionary.

Geert