Author Topic: MDG - Linked enum tagged values  (Read 3079 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1322
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
MDG - Linked enum tagged values
« on: September 02, 2022, 06:56:22 pm »
It would be nice to define linked enumeration tagged values within a stereotype for a custom MDG to be built.
Let's say you have a stereotype for an ArchiMate Component with 2 levels of categories.
I'd like to have a way in the stereotype definition to tell EA that if Level 1 Category tagged value = val1, it must select a specific enumeration to populate the drop down list. If the user selects val2, a different drop down list is displayed.
Of course selected values won't change, but the drop down values will.

So we would end up defining the following Enums
Level 1 Category = val1, val2, val3
Level 2(1) Category [linked with val1] = val1.1, val1.2, val1.3
Level 2(2) Category [linked with val2] = val2.1, val2.2
Level 2(3) Category [linked with val3] = val3.1, val3.2, val3.3, val 3.4

I guess this would have a large impact on EA (and Prolaborate to process it).



Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8018
  • Karma: +118/-20
    • View Profile
Re: MDG - Linked enum tagged values
« Reply #1 on: September 05, 2022, 03:52:39 pm »
You could write an add-in that responds to each level of tagged value changing to update the enumeration associated with the next level. It's not going to work with anything other than the EA UI.

The other option (also an add-in, which means that it will only be in the EA UI too) is to have 3 different sub-category properties and hide all of them except one based on the value of the first.

https://www.sparxsystems.com/enterprise_architect_user_guide/16.0/add-ins___scripting/rulesbroadcast_showelementproperty.html

In this case what you have is something like:
Level 1 Category = val1, val2, val3
Val1 Category [linked with val1] = val1.1, val1.2, val1.3
Val2 Category [linked with val2] = val2.1, val2.2
Val3 Category [linked with val3] = val3.1, val3.2, val3.3, val 3.4

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1322
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: MDG - Linked enum tagged values
« Reply #2 on: September 06, 2022, 05:12:45 pm »
Hi Eve,

Thank you for the information.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com