okay please help i do no have that much knowledge of OCL written constraints. in the picture below i am trying to put a constraint on class J that its attribute should be true after it but it is giving me an error Parsing Error: 1:1:4 “inv:” misplaced construct(s). i don't know how to solve this error and in the next class anonymous key=".0" i am also trying to put up a constraint that if the attribute of J class 'State' is true then this class be visible please help me if anyone knows about ocl constraints and also guide me for state machines as well thank you.
Asked
Active
Viewed 49 times
1 Answers
1
(I'm not familiar with RSA except in so far as what I can infer from 10 year obsolete Eclipse OCL behaviour.)
OCL by itself is almost useless since it has no models to operate on; it needs to be embedded within a model provider.
One such provider is OCL-in-UML where an Essential OCL expression is encapsulated by an OpaqueExpression. self.state=true or indeed just self.state would be a plausible Essential OCL expression for a Boolean-valued Constraint / invariant.
An alternative provider is a Complete OCL document which complements a metamodel.
You have used the Complete OCL syntax where you should have used Essential OCL.

Ed Willink
- 1,205
- 7
- 8