<div dir="ltr">Hello group,<br><br>Assuming I have the rule: <br><br>rule "try not to loop"<br> when<br> $a : A($code : code)<br> $b : B(parentCode == $code)<br> then<br> addResult($a, $b);<br>
end<br><br><br>and the classes:<br><br>public class A {<br>int code;<br>}<br><br>public class B {<br>int parentCode;<br>}<br><br><br><br>I insert into the WM 4 objects :<br>A(code = 1), A(code = 2);<br>B(parentCode=1), B(parentCode = 2);<br>
<br>I would like that after calling fireAllRules() only 1 match will be returned. I have no preference regarding which one, in the current situation 2 matches are returned. <br><br>Anyone could suggest a method to enforce this ?<br>
<br><br>Thank you,<br>Maxim.<br></div>