Author Topic: Properties versus Tagged Values  (Read 6571 times)

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
Properties versus Tagged Values
« on: February 20, 2017, 02:09:12 am »
Hello,

My understandig was that Properties of elements are Tagged Values. But when I use a Shape Script, than I have to add the tagged value again for the property set before (in my case "showdecoration" of ArchiMate Activity).

Did I do something wrong or is my understanding wrong?

V

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Properties versus Tagged Values
« Reply #1 on: February 20, 2017, 02:24:59 am »
Tagged values and class properties are two different things (they are stored at different locations in EA). However, the EA help (http://www.sparxsystems.com/enterprise_architect_user_guide/9.0/modeling_basics/thetaggedvaluestab.html) says:
Quote
A Tagged Value, strictly, is the value of a property of a modeling item, the property being called a tag. For example, a Class element called Person might have a tag called Age with the Tagged Value of 42. The combination of tag and value, however, is often referred to as a Tagged Value.
42 - hmm

I never got why there are properties and tagged values. This might shed some light on the subject, though it focuses on stereotypes: http://stackoverflow.com/questions/13808114/differences-between-stereotype-properties-and-tagged-value

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Properties versus Tagged Values
« Reply #2 on: February 20, 2017, 11:13:44 am »
I think this an "Animal Farm" analogy:  "All animals are equal, but some are more equal than others".

Since UML 2, Stereotypes can have tag definitions applied to them and when applied to a model element the values applied to the definition instances are the tagged values.

It doesn't say so explicitly, but to allow re-use of these tag definitions Sparx (whether by design or not) allows these definitions to be free-floating yet be applied to stereotypes.

So any tagged value can be applied to any element, but those defined for that stereotype are applied automatically.

I describe these stereotype attached tagged values as properties of the element (they will be attached to ) because it is of that particular metatype.

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

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
Re: Properties versus Tagged Values
« Reply #3 on: February 21, 2017, 12:22:47 am »
@qwerty, @paolo, thank you very much.

What confuses me is:
(1) Geert said in another discussion "Yes, Archimate properties are also Tagged Values."
(2) The original Shape Scripts of EA uses the function hastag. If I set the appropriate "property" (e.g. "showdecoration" = TRUE) the function "hastag" returns "TRUE" (and an arrow gets shown).
(3) If I create an ArchiMate BusinessProcessI on a diagram, it is normally has the property "showdecoration" set to "TRUE". The arrow (decoartion) gets displayed on the top right of the element in the diagram. As soon as I assign a sterotype (with my new Shape Script), the properties disappear in the properties sheet. I have to assign the hashtag (not hashtag) "showdecoration"to TRUE to the element to show the arrow again.

I know what properties, hashtags, stereotypes, etc. are, but I am confused in conjunction with EA.

Any ideas? V.

« Last Edit: February 21, 2017, 12:29:12 am by Viking »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Properties versus Tagged Values
« Reply #4 on: February 21, 2017, 10:55:43 am »
When you change the metatype of an item (by changing the stereotype) EA may replace the MDG defined properties.  (I say may because I reported a bug along those lines last week).

That's why you need to reset yours.

To be rigorous, you don't apply the stereotype with your shapescript, you render the applied stereotype with your shape script.  It is important that you understand the distinction.

You may find that assigning the same properties you find in the original ArchiMate MDG  metatype to the new metatype in your MDG should force EA to retain the property.

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

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
Re: Properties versus Tagged Values
« Reply #5 on: February 21, 2017, 06:27:33 pm »
Hi Paolo, thank you very much.

You may find that assigning the same properties you find in the original ArchiMate MDG  metatype to the new metatype in your MDG should force EA to retain the property.
HTH,
Paolo

How can I do this? I do not use MDG (as far as I undestand EA, at least not intentionally). V.


Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Properties versus Tagged Values
« Reply #6 on: February 22, 2017, 10:43:07 am »
Hi Paolo, thank you very much.

[SNIP]

How can I do this? I do not use MDG (as far as I undestand EA, at least not intentionally). V.
I guess, therefore, that you have created a new stereotype in the Configure | UML Types panel (the UML types dialog).  That is an unattached stereotype.  If this is the case, you can't assign tagged values to it automatically, you have to do it manually and individually for each element.  Can you confirm that's what you've done?
You will need to research MDGs.

Then you ask questions.

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

Viking

  • EA User
  • **
  • Posts: 453
  • Karma: +2/-2
    • View Profile
Re: Properties versus Tagged Values
« Reply #7 on: February 22, 2017, 09:01:17 pm »
Can you confirm that's what you've done? -> Confirmed.

You will need to research MDGs. -> Agreed.

Then you ask questions. -> Agreed.

Thank you, Paolo.