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 />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Item(code == "X")&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp;&nbsp; (or (not Item(code == "Y"))<br />
&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (not Item(code == "Z")))<br />
then<br />
&nbsp;&nbsp;&nbsp; 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>