That is how OR is expected to work in Rule Engines. It fires for each logical outcome. This is because each outcome ends up as sub rule.

Mark
Yuesong Wang wrote:
Odd behavior with the or operator.

The rule is:

package com.sample
import com.sample.DroolsTest.Message;

rule "Hello World"
  when
    m : Message( status == Message.HELLO ) || Message(
message == "Hello World" )
  then
System.out.println( "fired" ); end

One Message object is asserted. The rule would fire twice.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


Reply via email to