Book a Demo

Author Topic: enum tagged value dependent on another value  (Read 2377 times)

barrym

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
enum tagged value dependent on another value
« on: March 14, 2009, 04:16:33 am »
Is there a way to define a tagged value of type=enum and make the enumerated values dependent on the value of another tagged value?

Ex. If TaggedValue1=A, then TaggedValue2 options are (x,y,z); but if TaggedValue1=B, then TaggedValue2 options are (l,m,n).

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: enum tagged value dependent on another value
« Reply #1 on: March 14, 2009, 10:10:10 am »
No, I don't think so. This is really a limitation of the UML tagged value paradigm.

I do agree that it might be useful, but it would be difficult to specify well enough to make a product feature (at the EA level). That's not to say it would not make a good add-in.

There would probably need to be an event to trigger updates throughout the model - in your example, if you change TaggedValue1 later, then TaggedValue2 should change. I don't think such events are currently published by EA; it seems events are fired if a context item (something selected in a diagram or the Project Browser) changes. These events do not seem to be sensitive to tagged values.

Perhaps this is worth a feature request to Sparx. [Or several, if anyone else wants to pick up this torch].
No, you can't have it!