| OCL constraints on stereotypes [message #1046896] |
Mon, 22 April 2013 10:08  |
Vincent Verdier Messages: 7 Registered: April 2013 |
Junior Member |
|
|
Hi everyone,
I'm using Papyrus on Eclipse Juno and I have definied an OCL constraint on a stereoptype. Unfortunately, Papyrus doesn't seem to check this kind of constraints. I also tried on Eclipse Kelpler.
What can I do in order to check the OCL constraints that I have defined in a profile ?
Any help would be much appreciate.
Thanks.
|
|
|
|
|
|
|
|
|
| Re: OCL constraints on stereotypes [message #1047741 is a reply to message #1047725] |
Tue, 23 April 2013 11:34   |
Camille Letavernier Messages: 225 Registered: February 2011 |
Senior Member |
|
|
Hi,
A lead:
- a.memberEnds is a UML feature. This means that it returns instances of UML Elements (Which might be stereotyped with ServiceInteraction). It *won't* return instances of ServiceInteraction (Or any other stereotype). a is an Association, memberEnd contains Properties, r is a Property, and r.type is a UML Type. So you should type something like: not r.type.getAppliedStereotype(yourProfile::ServiceInteraction).oclIsUndefined()
However, this constraint should fail during validation.
> But when i validate the model that apply my profile (open *.uml-->right click on the model-->validate), the validation is successful!
You should use Papyrus to validate profiled models defined in Papyrus. Or, at least, use the latest UML integration build.
Regards,
Camille
|
|
|
|
Powered by
FUDForum. Page generated in 0.01778 seconds