Book a Demo

Author Topic: Can I create a conditional stereotype?  (Read 2809 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Can I create a conditional stereotype?
« on: August 20, 2020, 08:17:37 pm »
I have two stereotypes that I have defined. I would like to use one or the other. However, I do not want to see both show their tagged types. For example:

<<stereotype>> S1
+a
+b

<<stereotype>> S2
+c

Now, when I insert my stereotype S, I would like to choose either S1 or S2 as one of its tagged values and then fill out the attributes.

To make it more realistic, imagine I had a stereotype such as <<Address>>. I insert <<Address>> in the diagram and then choose in the tagged values whether it is German or US. Based on the selection, I get different tagged values.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Can I create a conditional stereotype?
« Reply #1 on: August 20, 2020, 11:45:13 pm »
Hello,


In short: no. The set of tagged values is associated with the stereotype, not with each other. You can't select one value for an enum tag and have the other tags switched out in response.1

In your example, you'd need two different stereotypes «GermanAddress» and «US_Address», and you have to make the selection when creating the element from the toolbox.


/Uffe


1 Except if you write an add-in to do it, but that would be counter to EA's intended function and such tool extensions never end up working well.
My theories are always correct, just apply them to the right reality.