|
|
|
|
|
|
Re: How to restrict multiple edge between two nodes [message #1795662 is a reply to message #1795593] |
Wed, 26 September 2018 09:41  |
Eclipse User |
|
|
|
Hi Prajna,
Indeed, you can use a service if you feel more confident than using aql expression
Nevertheless, in your Connection complete precondition, you should use preSource and preTarget variables instead of self variable.
Then, in your case, I think that aql:preSource.connectors->size()==0 do the same work as your precondition.
If you want to restrict creation of edge with other target, you can complete your precondition by checking if preTarget is already used as target of your connector by using select or excludes methods .
For example, with an ecore model, you can write the following precondition :
aql:preSource.eReferences->select(c|c.eType=preTarget)->size()==0 where eReference is the object represented by the created edge.
Regards,
|
|
|
Powered by
FUDForum. Page generated in 0.04653 seconds