Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Papyrus 1.12: Does OCL validation on models really work?
Papyrus 1.12: Does OCL validation on models really work? [message #601974] Tue, 11 May 2010 22:19 Go to next message
Shaman_Mahmoudi  is currently offline Shaman_Mahmoudi Friend
Messages: 16
Registered: February 2010
Junior Member
Hi,

I have downloaded and installed Papyrus 1.12. I am following the OCL constraint tutorial, and I can not validate my stereotypes against OCL constraints I have defined. It says validation succesful even when that is not the case. Does not matter in what context the classifier is, be it M1 or M2. It's as if the validation is not performed at all. What happened? Why it not workiing? Plan to updat 1.12 to a working one? Or do we need to wait for version 2 of the tool?

By the way, how did you solve the issue of which classifier (stereotype vs stereotype meta-class) to use in the context when validating against OCL constraints?

Thanks in advance.
Re: Papyrus 1.12: Does OCL validation on models really work? [message #601977 is a reply to message #601974] Wed, 12 May 2010 09:28 Go to previous messageGo to next message
Raphael Faudou is currently offline Raphael FaudouFriend
Messages: 105
Registered: July 2009
Senior Member
Hi Shaman,

there is a confusion. What you downloaded is Papyrus UML, an open source
solution based on Eclipse but not hosted by the Eclipse foundation.
You can submit bugs directly on the website:
http://www.papyrusuml.org/scripts/home/publigen/content/temp lates/show.asp?P=120&L=EN&ITEMID=35

This forum is dedicated to Eclipse MDT Papyrus component, which can be
considered as the new generation of Papyrus UML and integrates with
other initiatives coming from TOPCASED UML and Moskitt.

The first public release is expected for July 14th? Before you can find
information about how to download the code from SVN here :
http://wiki.eclipse.org/Papyrus_Developer_Guide

Hope things are clear now
regards
raphaël

Shaman_Mahmoudi a écrit :
> Hi,
>
> I have downloaded and installed Papyrus 1.12. I am following the OCL
> constraint tutorial, and I can not validate my stereotypes against OCL
> constraints I have defined. It says validation succesful even when that
> is not the case. Does not matter in what context the classifier is, be
> it M1 or M2. It's as if the validation is not performed at all. What
> happened? Why it not workiing? Plan to updat 1.12 to a working one? Or
> do we need to wait for version 2 of the tool?
>
> By the way, how did you solve the issue of which classifier (stereotype
> vs stereotype meta-class) to use in the context when validating against
> OCL constraints?
>
> Thanks in advance.
Re: Papyrus 1.12: Does OCL validation on models really work? [message #601983 is a reply to message #601977] Wed, 12 May 2010 10:02 Go to previous messageGo to next message
Shaman_Mahmoudi  is currently offline Shaman_Mahmoudi Friend
Messages: 16
Registered: February 2010
Junior Member
Hi Rafael,

Thanks a lot for the information! Now everything makes sense! That other project looked abandoned considering documents did not align with what the product offered and no word about progress.

I believe I am more interested in the Papyrus MDT component, and I have taken a look at the source code, in particular OCL validation. If it is ok, I want to ask a question regarding it.

I have read and tried that piece od code, and there is one issue that is confusing me. In order to validate against an OCL constraint, you need to set the classifier context and then do the validation. In the code, the validation is allways done on M1 level it seems. If the OCL constraint as a method (example self.allOwnedElements()) or attribute defined in the UML meta model, then the context is on M2. With the current code, you'll get an exception if you try to do validate against such a constraint. An easy but maybe not elegant solution is to first try to create the invariant on M1 level, if fails, try in M2 level. How are you solving this issue? i.e. how to know in what context the constraint is defined in.

Thanks in advance!
Re: Papyrus 1.12: Does OCL validation on models really work? [message #602123 is a reply to message #601983] Fri, 25 June 2010 12:46 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6772
Registered: July 2009
Senior Member
Hi Shaman

I'm not familiar with Papyrus; I first downloaded it an hour ago. But I
am very interested in smoothing off the rough edges that make use of OCL
much harder than it should be.

It would be very helpful to see how you are trying to use Papyrus and to
have a newbie-oriented description of the problems you are encountering.

Regards

Ed Willink (MDT/OCL committer)

On 12/05/2010 11:02, Shaman_Mahmoudi wrote:
> Hi Rafael,
>
> Thanks a lot for the information! Now everything makes sense! That other
> project looked abandoned considering documents did not align with what
> the product offered and no word about progress.
>
> I believe I am more interested in the Papyrus MDT component, and I have
> taken a look at the source code, in particular OCL validation. If it is
> ok, I want to ask a question regarding it.
>
> I have read and tried that piece od code, and there is one issue that is
> confusing me. In order to validate against an OCL constraint, you need
> to set the classifier context and then do the validation. In the code,
> the validation is allways done on M1 level it seems. If the OCL
> constraint as a method (example self.allOwnedElements()) or attribute
> defined in the UML meta model, then the context is on M2. With the
> current code, you'll get an exception if you try to do validate against
> such a constraint. An easy but maybe not elegant solution is to first
> try to create the invariant on M1 level, if fails, try in M2 level. How
> are you solving this issue? i.e. how to know in what context the
> constraint is defined in.
>
> Thanks in advance!
Previous Topic:Re: OCL in drawing tool!!
Next Topic:Object flows on activity diagrams
Goto Forum:
  


Current Time: Sun Jul 12 05:45:00 GMT 2020

Powered by FUDForum. Page generated in 0.02151 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top