Book a Demo

Author Topic: MDG-technology: adding duplicate tags to stereotyped element  (Read 8644 times)

Anna I

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
MDG-technology: adding duplicate tags to stereotyped element
« on: February 02, 2017, 01:04:03 am »
Colleguages and I have created an MDG-technology for modelling using Logical UML Class Diagrams in EA as a base.

One of our issues concerns adding and displaying tags relevant to a specific stereotype described by the profile definition embedded in the MDG technology.

By stereotyping the metaclass Class, we have added a number of custom tagged values, and now we have a new custom tagged value pane next to the standard 'tags' pane.

This works ok.

However, we require the technology to allow the addition of multiple tags with duplicate tag names. So, aside from filling in the predefined tags, it should be possible to add a new tag-value pair. We have tried using the UML-types to present a list of possible tag names (which naturally correspond with the tag names in the custom profile, however, the new tag-value pair appears not to be listed under the grouping containing the other tags specified by the MDG-technology.

In short, how can we allow the addition of duplicate tags in accordance with our MDG?

Thanks
Anna

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #1 on: February 02, 2017, 01:37:13 am »
On a guess: in the tagged values window click the Settings button and tick Show Duplicate.

q.

Anna I

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #2 on: May 01, 2017, 04:49:54 pm »
Thanks qwerty, but the issues does not concern showing duplicate tags in general (which has been enabled).

I also sent a message to the Sparx Support Team and got the following response:

"Unfortunately it's not possible to add additional tags which are grouped with the stereotype/MDG Technology tags as you described. This issue has been reported previously by another user also and is logged as a bug to be fixed. We cannot yet say when (in which build) the fix will be implemented."

So, hopefully the bug will be fixed in the near future.

Anna

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #3 on: May 01, 2017, 04:56:46 pm »
[SNIP]
hopefully, the bug will be fixed in the near future.

Anna
FYI, "near future" on planet Sparx means "sometime this century, probably the latter half..."   ;)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #4 on: May 02, 2017, 06:37:53 am »
One thing you could try is creating a classes with the attributes you want and inheriting them from your stereotype for your MDG rather than just putting them as attributes in your stereotype. I think it might provided a mechanism to get around your problem. In addition you get your attributes grouped together in the tag window with some context as a bonus which makes it more usable.
 
Happy to help
:)

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #5 on: May 02, 2017, 08:44:47 am »
FYI, "near future" on planet Sparx means "sometime this century, probably the latter half..."   ;)
It wasn't one of us that said near future.

In my opinion, the problem isn't technical. It's how the GUI should work since the current behavior is also valid.


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #6 on: May 02, 2017, 09:59:01 am »
FYI, "near future" on planet Sparx means "sometime this century, probably the latter half..."   ;)
It wasn't one of us that said near future.

In my opinion, the problem isn't technical. It's how the GUI should work since the current behavior is also valid.
It WAS a joke, ...

But it doesn't have to be a Sparxian to say "near future" - it's about having the same understanding of the terms.  See: Helsinki Principle

As it happens, I agree with your view that the GUI is behaving in a valid manner.  But that wasn't potentially humorous.  ;D

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #7 on: May 02, 2017, 12:25:13 pm »
Yeah, I know it was a joke. I just happen to suck all the joy out of life.

PS. I've personally had to workaround this behavior for roughly 10 years. It hasn't been changed because I classified the current behavior as "correct but inconvenient for my use case". At the same time the alternate behavior has always been classified as "it would be nice".

Anna I

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #8 on: July 19, 2017, 12:00:39 am »
Simon, I was just wondering how you had worked around the this behaviour?  :)  Are you using the same workaround as described in Reply #4?

Seeing as the UML profil included in the MDG allow the specification of tags (attributes) with [0..*] multiplicity, surely it should be possible in the GUI to recreate this scenario. Either by allowing the addition of extra tags (as defined by the MDG - not new unknown ones) or having tag values represented by arrays - lists of values.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: MDG-technology: adding duplicate tags to stereotyped element
« Reply #9 on: July 19, 2017, 09:04:43 am »
I've added tags with the same name but not from the profile. When necessary for neatness I'll run a script over the tagged values to make EA see them as part of the profile (by changing the first half of the guid)

Code: [Select]
function UpdateMyStereotype( issue )
{
var element as EA.Element;
element = issue;

for ( var i = 0 ; i < element.TaggedValues.Count ; i++ )
{
var tag as EA.TaggedValue;
tag = element.TaggedValues.GetAt( i );

if(tag.Name == "MyTag1")
{
var newGUID = "{88604871-F928-ebf9-" + tag.PropertyGUID.substring(20);
Execute("Update t_objectproperties set ea_guid = '" + newGUID + "' where ea_guid='" + tag.PropertyGUID + "'");
}
else if(tag.Name == "MyTag2")
{
var newGUID = "{A0862D32-C049-20c0-" + tag.PropertyGUID.substring(20);
Execute("Update t_objectproperties set ea_guid = '" + newGUID + "' where ea_guid='" + tag.PropertyGUID + "'");
}
}
element.SynchTaggedValues("MyProfile", "MyStereotype");
AdviseElementChange(element.ElementID);
}

Replace MyProfile, MyStereotype, MyTag1 and MyTag2 with values from your profile. For the two guid fragments, look at the prefix all of your profile tagged values have and copy it.