Book a Demo

Author Topic: OCL and model-validation  (Read 2086 times)

meng

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
OCL and model-validation
« on: January 27, 2007, 02:44:37 am »
Hi folks,
can anyone give me an idea, how to use OCL-expressions within the EA ? I have read the EA tutorial for many times and I have done a lot of examples - with no success.

What I would like to do first: I have a class defined "firma" and an attribut "AnzMitarbeiter" within the class. In the constrain-tab of the properties (of the class)I filled in....
Type -> I choose "OCL"
Status -> "Approved"
Constraint -> oclConstraint
text -> inv: self.oclIsTypeOf(Class)

This works successfull with the model-validation. But what I want to do ist, to express an OCL like "context Firma inv: self.AnzMitarbeiter > 0" and I don't know how to do this within EA.

Thanks a lot for any help,
Matthias.
:-/

thomaskilian

  • Guest
Re: OCL and model-validation
« Reply #1 on: January 29, 2007, 11:02:46 pm »
Although Sparx claims that this works, I never got any construct to work which is a bit more complex than say "x <> 1". There are some threads dealing with exactly that topic here on the board.