Re: [OCLinEcore] Calling operations within constraints [message #526423] |
Sat, 10 April 2010 15:47  |
Eclipse User |
|
|
|
This seems more of an OCL question so I've redirect it to their newsgroup.
sapereaude wrote:
> I've been working with EMF (Helios M6) for about one week now,
> developing a domain model for my student research project. The
> structure of my model is finished and now I am working on the
> constraints. Since some of my constraints are a little more complex, I
> want to embed operations into them.
>
> But when I call an operation from within a constraint, I get useless
> results.
>
> Here is a minimal example model:
>
> http://www.abload.de/image.php?img=oclproblemk2b0.png
>
> The "mustHaveName" constraint is properly evaluated, but the
> "notOwnDescendant" constraint doesn't work even if it is clearly
> violated.
>
> Any ideas what I might be doing wrong?
|
|
|
|
|
Re: [OCLinEcore] Calling operations within constraints [message #526468 is a reply to message #526453] |
Sun, 11 April 2010 10:56  |
Eclipse User |
|
|
|
Hi
Please raise a Bugzilla attaching files that do not work.
Regards
Ed Willink
On 11/04/2010 10:53, sapereaude wrote:
> There is no error in the log. I also tried the closure-operator, but
> with no success. However I want to point out that this has nothing to do
> with this specific operation, it is just an example.
>
> I also tried to define an operation called "childrenSize() : EInt"
> (children->size())
> and then define a constraint called "hasManyChildren" (childrenSize() > 2)
>
> In my instance model this constraint is violated on all persons
> (everyone has exactly one child), but validation completes without errors.
>
> If I directly define "hasManyChildren" as (children->size() > 2), then
> it is properly evaluated and I get the expected errors on my instance
> model.
|
|
|
Powered by
FUDForum. Page generated in 0.05530 seconds