The first rule will fire if there exists a MyObject with status "start", but only once when there are multiple instances of MyObject with "start". The second rule will fire once for each MyObjects with status "start".

Russ Egan wrote:
What is the purpose of exists?  How is :

rule "sample"
  when
     exists MyObject(status == "start")
  then
     // do something
end

different from:

rule "sample"
  when
     MyObject(status == "start")
  then
     // do something
end




Reply via email to