Book a Demo

Author Topic: Tagged Value re-use  (Read 8359 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Tagged Value re-use
« on: July 06, 2016, 03:57:34 pm »
A nice feature of the Sparx MDG is that I can create a General Tagged Value Type such as:
Effectiveness:
Type=Enum;
Values=Very,Generally,Sometimes,Hardly ever,Almost never,«Unspecified»;
Default=«Uninitialized»;

And in the MDG assign that Tagged value type to a stereotype (metatype) as:
<TaggedValues>
   <Tag name="Effectiveness"/>
</TaggedValues>

Notice how I've not had to put in the explicit values at this point (You CAN, but there's no need - EA will helpfully provide the drop-down)!  8)
The NEAT thing is that if the main definition changes (like I alter the enumeration literals), then the metatype's version will automatically take on the new values in the drop-down.  8)

What I'd like to be able to do is now define:
<TaggedValues>
   <Tag name="ExpectedEffectiveness" type="Effectiveness"/>
</TaggedValues>
and have the tag inserted into the item as ExpectedEffectiveness but still provide the drop-down from Effectiveness.

As far as I can make out, there is no way to achieve this?  :(

Can anyone confirm you can't re-use a Tagged Value definition in this way?

Also, is this a desirable feature? Should I put in a feature request?



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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Tagged Value re-use
« Reply #1 on: July 06, 2016, 07:10:56 pm »
I guess you need to look up MOF or whatever document from OMG specifies it. Most likely TVs are not typed (just a guess).

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Tagged Value re-use
« Reply #2 on: July 06, 2016, 09:05:37 pm »
Paolo,

If you define your profile properly you create an enumeration that contains the values of your tagged values.

Then you can reuse this enumeration in as many tagged values as you like.
So in a way this feature already exists.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Tagged Value re-use
« Reply #3 on: July 07, 2016, 09:45:17 am »
Paolo,

If you define your profile properly you create an enumeration that contains the values of your tagged values.

Then you can reuse this enumeration in as many tagged values as you like.
So in a way this feature already exists.

Geert
Thanks Geert,

But ALL that does is to make copies of the values into the particular stereotype, there is no referencing mechanism to provide one source of truth WITHIN the MDG, it's external.

I already have that functionality within the MDG.  As usual, I'm after something more.    ;)

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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Tagged Value re-use
« Reply #4 on: July 07, 2016, 09:46:55 am »
I guess you need to look up MOF or whatever document from OMG specifies it. Most likely TVs are not typed (just a guess).

q.
Does it matter what MOF says? 

Sparx EA ALREADY types Tagged values" type=<structured TV type>.

I'm just after a natural extension.

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