[rules-users] semantically equivalent DROOLS L-value expressions?
Mark Proctor
mproctor at codehaus.org
Mon Oct 22 23:43:48 EDT 2012
single equal sign, must be double:
> attrA = "foo"
On 22 Oct 2012, at 20:44, Cotton.Ben <ben.d.cotton.iii at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121023/c208ce96/attachment.html
More information about the rules-users
mailing list