Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How can I add OCL constraints to My Model(How can I add OCL constraints to My Model?)
How can I add OCL constraints to My Model [message #1016528] Wed, 06 March 2013 19:00 Go to next message
manou manno is currently offline manou mannoFriend
Messages: 1
Registered: March 2013
Junior Member
Hi,

I am using Eclipse Kepler 4.3.0M5a and Papyrus kepler.
I have developed my own Model using Papyrus Marte and SRM.
I want to know how can I add OCL constraints to it? because I need to validate if a model that applies my Model is correct or not.

I have an example of an OCL Constraint which I want to add it to my Task in the model, but I don't know how to add it using papyrus kepler:

context Task
inv:
if(Self.minPriorityLevel< Self.maxPriorityLevel) then
Self.minPriorityLevel < Self.PriorityValue < Self.maxPriorityLevel
else
Self.maxPriorityLevel< Self.PriorityValue < Self.minPriorityLevel
endif



I'd appreciate any help on this.
Thanks in advance,
Re: How can I add OCL constraints to My Model [message #1017056 is a reply to message #1016528] Fri, 08 March 2013 19:06 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Coincidentally someone with a different name posted exactly the same
example with exactly the same typos on the Papyrus newsgroup.

Have a look at the answer there.

Regards

Ed Willink


On 07/03/2013 00:33, manou manno wrote:
> Hi,
>
> I am using Eclipse Kepler 4.3.0M5a and Papyrus kepler.
> I have developed my own Model using Papyrus Marte and SRM.
> I want to know how can I add OCL constraints to it? because I need to
> validate if a model that applies my Model is correct or not.
>
> I have an example of an OCL Constraint which I want to add it to my
> Task in the model, but I don't know how to add it using papyrus kepler:
>
> context Task
> inv:
> if(Self.minPriorityLevel< Self.maxPriorityLevel) then
> Self.minPriorityLevel < Self.PriorityValue < Self.maxPriorityLevel
> else
> Self.maxPriorityLevel< Self.PriorityValue < Self.minPriorityLevel
> endif
>
>
> I'd appreciate any help on this.
> Thanks in advance,
Previous Topic:Value of Enumeration is not legal
Next Topic:Latest lable feature search algorithm
Goto Forum:
  


Current Time: Thu Apr 25 22:39:06 GMT 2024

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

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

Back to the top