[gme-users] GME OCL expression....
Cho Nayun
tomorrow0001 at gmail.com
Wed Mar 2 23:32:48 CST 2011
Hi, I'm a GME beginner to make some DSME.
I'm just trying to designing a metamodel which has its own purposes,
however, I got some problems when I assigned some model-constraints into my
model.
Let's think about a metamodel which includes " A<<Model>> " , " B <<Model>>
" , " AtoB <<Connection>> ". (simply for helping the understanding)
Every Model can be associated by " AtoB <<Connection>> ". ( like A<<Model>>
can associated with B<<Model>>, B<<Model>> also can be associated with
A<<Model>> )
Moreover, only A<<Model>> has enumerate attribute called " state:enum ".
state<<EnumAttribute>> has " One ", " Two " values.
I want to describe a model-constraint as further below.
" If AtoB <<Connection>> connected Some Model ( it can be A<<Model>> or
B<<Model>>) and If the connected Model has state<<EnumAttribute>> values
which has "One" value
then informing error message to the designer. "
Actually I was used a OCL expression to make similar model constraint like
" If AtoB <<Connection>> connected Model which is A<<Model>> then informing
error message to the designer "
The OCL constraint is
"self.connectionPoints("dst")->theOnly().target().name()<>"A"" like this.
However, the mentioned one is not easy to describe.
How can I make a constraint rule in OCL which I mentioned ?
Any advice can be helpful to my research.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20110303/b60e567b/attachment.html
More information about the gme-users
mailing list