|Re: How to restrict multiple edge between two nodes [message #1795494 is a reply to message #1795488]
||Mon, 24 September 2018 09:52
Registered: July 2018
Thanks for replying..
I am using element based edge between two nodes.
Same edge I can create multiple times. But I want it like, it should not allow user to connect to that same target twice. From that source to other target node user can connect, but between same nodes it should not be able to create.
I thought it is possible by connection complete precondition.
[Updated on: Mon, 24 September 2018 09:56]
Report message to a moderator
|Re: How to restrict multiple edge between two nodes [message #1795662 is a reply to message #1795593]
||Wed, 26 September 2018 13:41
|| Laurent Fasani
Registered: October 2014
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
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 :
where eReference is the object represented by the created edge.
Laurent Fasani - Obeo
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.01776 seconds