Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » From UML 2 constraints to non callable invariants in Ecore
From UML 2 constraints to non callable invariants in Ecore [message #871169] Fri, 11 May 2012 04:55 Go to next message
Laurent Mattina is currently offline 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 17:08 Go to previous messageGo to next message
Klaas Gadeyne is currently offline Klaas Gadeyne
Messages: 86
Registered: July 2009
Member
Laurent Mattina wrote on Fri, 11 May 2012 04:55
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.


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)
Re: From UML 2 constraints to non callable invariants in Ecore [message #1022285 is a reply to message #1009315] Thu, 21 March 2013 11:55 Go to previous message
Klaas Gadeyne is currently offline Klaas Gadeyne
Messages: 86
Registered: July 2009
Member
Hi, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=403374
Previous Topic:How to retrieve the DefaultValues of stereotype?
Next Topic:Package Diagrams
Goto Forum:
  


Current Time: Mon Jul 28 00:35:54 EDT 2014

Powered by FUDForum. Page generated in 0.01499 seconds