Book a Demo

Author Topic: Constraints question  (Read 5803 times)

thomaskilian

  • Guest
Constraints question
« on: February 13, 2006, 02:04:57 pm »
If I have two constraints and want to attach them to an association: how can I distinguish between
a) AND
b) OR
c) XOR
Any hint appreciated.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Constraints question
« Reply #1 on: February 13, 2006, 02:14:36 pm »
I don't quite know what you mean Thomas. Are you speaking of something along the lines of an XOR constraint between two connectors?

I remember doing this with EA back a year and change. The way to do it was not quite what I expected - not that it didn't make sense, but I tried all kinds of subtle (as in "dumb, but unwise nontheless") things first. In the end the results were quite satisfactory, all things considered.

Of course, now I cannot remember how I did it.

Hint: EA models these as a note. There's something like a "constraint note" in one of the dialogs; once you see that you are home free.

While the result is not exactly the {XOR} notation you see in some OMG stuff, it still works out well. You can size the resulting note graphic to make it smaller.

David
No, you can't have it!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Constraints question
« Reply #2 on: February 13, 2006, 06:26:01 pm »
Quote
If I have two constraints and want to attach them to an association: how can I distinguish between
a) AND
b) OR
c) XOR
Any hint appreciated.


If you are talking about one association with two constraints, I would think you would use Object Constraint Language OCL in the constraints box in the association's properties.
Verbal Use Cases aren't worth the paper they are written upon.

thomaskilian

  • Guest
Re: Constraints question
« Reply #3 on: February 13, 2006, 11:27:22 pm »
Thanks for that guys. I'll have to read about OCL then.