single equal sign, must be double:
attrA = "foo"



On 22 Oct 2012, at 20:44, Cotton.Ben <ben.d.cotton.iii@gmail.com> wrote:

Hi, I am a DROOLS newbie. I apologize if this has been asked before. This rule (R1) is not syntactically correct in the Eclipse .DRL view.
rule "R1" 
    when  
        Message( 
             ((attrA = "foo" && _attrB == "bar") || AttrA== "foo")  //syntax error (curious, why?)
        )
    then 
        System.out.println( "R1 pattern-matched Message.  DROOLS Consequence executing now." );    
end

but R2 is syntactically correct =
rule "R2" 
    when  
        Message( attrA = "foo" && _attrB == "bar") || 
        Message (AttrA== "foo")

    then 
        System.out.println( "R2 pattern-matched Message.  DROOLS Consequence executing now." );    
end

In Drools 5.2, are R1 and R2 semantically equivalent?

View this message in context: semantically equivalent DROOLS L-value expressions?
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users