Sébastien,
Even then, Christian suggests the correct approach, imho.
This is also how we do it.
The most tricky part in Papyrus seems to be to make sure the constraints are evaluated.
For these simple OCL constraints and dynamic profiles, it works quite trivially.
What does it do for you? It just doesn’t validate anything at all? It gives an error? Do you have a reproduction profile/model? What
version are you working on?
Best regards,
Johan
Van: mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx]
Namens GERARD Sebastien
Verzonden: vrijdag 19 mei 2017 15:35
Aan: Papyrus Project list <mdt-papyrus.dev@xxxxxxxxxxx>
Onderwerp: Re: [mdt-papyrus.dev] OCL question on a profile
It could work if I define this constraint a model. In my case, the constraint is defined in
the profile defining the aforementioned stereotype.
|
|
|
|
|
Sébastien Gérard
Head of the LISE labs
CEA Research Director
Papyrus project Leader (www.eclipse.org/papyrus)
Commissariat à l’énergie atomique et aux énergies alternatives
Institut List
|
CEA Saclay Nano-INNOV
|
Bât. 862- PC174
F-91191 Gif-sur-Yvette Cedex
M. +33 6 88 20 00 47
T. +33 1
69 08 58 24
sebastien.gerard@xxxxxx
www-list.cea.fr
|
|
|
|
|
|
|
|
|
|
|
|
Hi, Sébastien,
Try this: self.extension_NFP->notEmpty() implies self.extension_ASIL->notEmpty()
On May 19, 2017, 08:56 -0400, GERARD Sebastien <Sebastien.GERARD@xxxxxx>,
wrote:
Hi all,
Who can tell how to write the following rule in OCL?
On the profile denoted below, I would like to have a rule to check that is an Operation has the <<NFP>>
applied stereotype, then it has also the <<ASIL>> one.
Thanks.
|
|
|
|
|
Sébastien Gérard
Head of the LISE labs
CEA Research Director
Papyrus project Leader (www.eclipse.org/papyrus)
Commissariat à l’énergie atomique et aux énergies alternatives
Institut List
|
CEA Saclay Nano-INNOV
|
Bât. 862- PC174
F-91191 Gif-sur-Yvette Cedex
M. +33 6 88 20 00 47
T.
+33 1
69 08 58 24
sebastien.gerard@xxxxxx
www-list.cea.fr
|
|
|
|
|
|
|
|
|
|
|
|
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev