[rules-users] Re :Action firing twice

Vithal Kuchibhotla vithalklrk at rediffmail.com
Tue Dec 2 00:28:43 EST 2008


Reformatted as plain text:Hello All,I have a list of Items that I am inserting into working memory. Here is the rule that is failing:
rule "Cannot select X if both Y and Z are not selected"
when
      Item(code == "X")    
     (or (not Item(code == "Y"))
           (not Item(code == "Z")))
then
    System.out.println("Error: You cannot select X unless both Y and Z are selected");
end
This rule works correctly when X and Y are there, and when X and Z are there.
However, when both Y and Z are missing, the error prints twice.
Can anyone tell me what I am doing wrong.
Thanks a lot
Vithal      
      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081202/a92b6278/attachment.html 


More information about the rules-users mailing list