Book a Demo

Author Topic: Set of Enum values as a Tag  (Read 3244 times)

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Set of Enum values as a Tag
« on: August 17, 2020, 12:21:38 am »
Defining a stereotype in a profile with an attribute of Enumeration type, and setting the Multiplicity to something greater than 1 - I hopped to be able to select several enum values for that tag in the model at an element assigned this stereotype.
But I can select only one item.

Example:
The metaclass Class is extended by the stereotype "SW Unit" with the attribute "System Variant" of enum type [TINY, SMALL, MID, SIZED, HUGE]. In the model, applying "SW Unit" stereotype to some class, e.g. Ethernet, I would be able to set the tag "System Variant" to MID, SIZED, HUGE, telling that systems of TINY and SMALL do not host a class named Ethernet.

Why does Multiplicity not work for tags with enumerations
? (workaround would be to define the attribute in the profile as to be String, but in that case I'll loose the choices pull-down and have to remember all value options)
Rolf

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Set of Enum values as a Tag
« Reply #1 on: August 17, 2020, 04:42:54 pm »
Yeah, no, that doesn't work like that.

You can mimic the behavior using a CheckList tagged value type, but it is far from trivial to actually do something with that data in reports and stuff.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Set of Enum values as a Tag
« Reply #2 on: August 18, 2020, 08:13:22 am »
Why does Multiplicity not work for tags with enumerations?
Because it hasn't been implemented for any tags.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Set of Enum values as a Tag
« Reply #3 on: August 18, 2020, 04:10:15 pm »
Why does Multiplicity not work for tags with enumerations?
Because it hasn't been implemented for any tags.
To be precise, multiplicity is partly implemented for tagged value connectors -- but not tagged value attributes.

If you specify a tagged value connector multiplicity of 1, you get the same behaviour as a RefGUID. If you specify * (IIRC, maybe it's 0..*), you get RefGUIDList.

But specific multiplicities other than 1, upper bounds other than *, and lower bounds other than 0 are not supported.


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