From UML 2 constraints to non callable invariants in Ecore [message #871169] |
Fri, 11 May 2012 08:55 |
Laurent Mattina Messages: 5 Registered: April 2012 |
Junior Member |
|
|
Hi everyone,
I am using version 0.8.1 of Papyrus and I would like to implement a UML metamodel constrained with OCL rules. I obviously found the "constraint" element, available in the main diagram, and I defined all my constraints.
My problem occurs later, when I use a genmodel to convert my UML metamodel into Ecore. Indeed, the constraints are kept but translated into "callable invariants". The problem is that validation requires "regular" invariants...
I read several websites and forums in order to find out a solution, but with no success...The only way I got is to open the Ecore metamodele with OCLinEcore and delete BY HAND every single "callable" mention. Obviously, I do not think it is the best way to do it !
I think that there is an option, in the UML metamodel, to say whether the invariant must be "callable" or not. However, I cannot find it, and I am running out of solution...
I do not know if I am clear enough but does anyone have an idea about it??
Thanks,
Laurent
PS : for several reasons, I cannot use a higher version of Papyrus...
|
|
|
Re: From UML 2 constraints to non callable invariants in Ecore [message #1009315 is a reply to message #871169] |
Thu, 14 February 2013 22:08 |
Klaas Gadeyne Messages: 165 Registered: July 2009 |
Senior Member |
|
|
Laurent Mattina wrote on Fri, 11 May 2012 04:55Hi everyone,
I am using version 0.8.1 of Papyrus and I would like to implement a UML metamodel constrained with OCL rules. I obviously found the "constraint" element, available in the main diagram, and I defined all my constraints.
My problem occurs later, when I use a genmodel to convert my UML metamodel into Ecore. Indeed, the constraints are kept but translated into "callable invariants". The problem is that validation requires "regular" invariants...
I read several websites and forums in order to find out a solution, but with no success...The only way I got is to open the Ecore metamodele with OCLinEcore and delete BY HAND every single "callable" mention. Obviously, I do not think it is the best way to do it !
I think that there is an option, in the UML metamodel, to say whether the invariant must be "callable" or not.
I didn't find any...
I couldn't find a parameter setting for the UML2ecore transformation that allows to "disable" this either.
Are you sure that a "callable invariant" should not be evaluated (I couldn't find callable in the OCL spec, so it might be something MDT/OCL specific? OTOH It doesn't seem to be mentioned in the MDT/OCL preferences either)
Quote:
However, I cannot find it, and I am running out of solution...
I do not know if I am clear enough but does anyone have an idea about it??
Thanks,
Laurent
PS : for several reasons, I cannot use a higher version of Papyrus...
The "problem" still seems to exist in Kepler, although I think this might be the wrong forum. I don't think it has anything to do with papyrus, but rather with UML2 (or the project responsible for providing the transformation to ecore)
|
|
|
|
Powered by
FUDForum. Page generated in 0.03223 seconds