Write an audit rule [message #151733] |
Wed, 19 September 2007 16:40  |
Eclipse User |
|
|
|
Originally posted by: elena.renzi.hotmail.com
Hi all,
In my diagram I have an element(element1) that have to be linked to
another element(element2). The palette allows me to create this element1
alone, but when I validate the model I want to display an error that tells
me to create the link between element1 and element2. The question is: how
can I write this using OCL?
Thanks and regards,
Elena
|
|
|
Re: Write an audit rule [message #151890 is a reply to message #151733] |
Fri, 21 September 2007 01:21  |
Eclipse User |
|
|
|
Elena,
In this case, you might not need to use OCL.
In your ecore, just set the lower bound of the EReference to "1" instead
of "0". As a result, the validation will tell you that the reference is
not set.
Koji
Elena wrote:
> Hi all,
> In my diagram I have an element(element1) that have to be linked to
> another element(element2). The palette allows me to create this element1
> alone, but when I validate the model I want to display an error that tells
> me to create the link between element1 and element2. The question is: how
> can I write this using OCL?
> Thanks and regards,
> Elena
|
|
|
Powered by
FUDForum. Page generated in 0.18886 seconds