|
Re: Invariant disallowing element usage [message #22306 is a reply to message #22140] |
Wed, 09 May 2007 12:38 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Florian,
You could try something like this:
context Activity
inv: self.node->forAll(not oclIsKindOf(ForkNode))
or, more in the style of filtering:
context Activity
inv: self.node->select(oclIsKindOf(ForkNode))->isEmpty()
HTH,
Christian
Florian Georg wrote:
> Hi,
>
> I want to write an OCL constraint that validates an Activity and
> disallows "ForkNode" instances (e.g. no parallelism is allowed).
>
> Basically I don't know how to "filter" a collection (e.g.
> self.ownedMember) based on some criteria - type in this case.
>
> Any ideas? Thanks for your help in advance,
>
> regards,
> Florian
|
|
|
Powered by
FUDForum. Page generated in 0.03390 seconds