<br> Haaaaa!!! :)<br><br> I knew there would be a use case for a constraint negative operator (not/!)!! <br> Sorry, it is not available in 4.0 but you can open a feature request and I may add it to the next release! :)
<br><br> Anyway, there are other ways. Just to make sure I understand your case, can you please state your rules in plain English? I think there may be easier ways to express them then the way you showed bellow.<br><br>
[]s<br> Edson<br><br><div><span class="gmail_quote">2007/7/25, Yuri de Wit <<a href="mailto:ydewit@gmail.com">ydewit@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a case where I need to negate only part of the predicates.<br><br>RULE1<br>when:<br> c1 : Child()<br> c2 : Child(hashCode < c1.hashCode, prop1==c1.prop1, ... propN==c1.propN)<br>then:<br> insert(new Parent(c1, c2));
<br><br>RULE2<br>when<br> p:Parent()<br> c1:Child(this memberOf p)<br> not Child(this memberOd p, prop1==c1.prop1, ...propN==c1.propN)<br>then<br> retract(p);<br><br>While in rule1 I use a matching criteria to group c1 and c2, in rule2
<br>I want to use the inverse of the same exact criteria to ungroup them.<br>I dont care which propN no longer holds, as long as the any of the<br>propN no longer holds. The problem is that I still need the "positive"
<br>this memberOf p. How to solve this problem?<br><br>RULE2<br>when<br> p:Parent()<br> c1:Child(this memberOf p)<br> Child(<br> this memberOd p,<br> not(prop1==c1.prop1, ...propN==c1.propN)<br> )<br>
then<br> retract(p);<br><br>(afaik, not supported)<br><br>any ideas?<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer
<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>