Reformatted as plain text:<br /><br />Hello All,<br /><br />I have a list of Items that I am inserting into working memory. Here is the rule that is failing:<br /><br />
rule "Cannot select X if both Y and Z are not selected"<br />
when<br />
Item(code == "X") <br />
(or (not Item(code == "Y"))<br />
(not Item(code == "Z")))<br />
then<br />
System.out.println("Error: You cannot select X unless both Y and Z are selected");<br />
end<br /><br />
This rule works correctly when X and Y are there, and when X and Z are there.<br />
However, when both Y and Z are missing, the error prints twice.<br />
Can anyone tell me what I am doing wrong.<br /><br />
Thanks a lot<br />
Vithal<br /> <br /> <br />
<br>