[rules-users] Drools 5.2.0-SNAPSHOT: .drl broken?

ljnelson ljnelson at gmail.com
Thu Mar 24 07:40:58 EDT 2011


My rule that I'm using in unit testing only looks like this:

rule "Testing contains"
  dialect "mvel"
  when
    Response( $answerSelections : answerSelections )
    AnswerSelection( answer.ID in (2, 3) )
  then
    System.out.println("Testing contains activated")
end

Response has a getAnswerSelections() method.  AnswerSelection has a
getAnswer() method.  Answer has a getID() method.

During rule compilation, I get the following error:

Unable to Analyse Expression answer.ID == 2 || answer.ID == 3:
[Error: Failed to compile: 1 compilation error(s): 
 - (1,9) unqualified type in strict mode for: ID]
[Near : {... Unknown ....}]
             ^
[Line: 1, Column: 0] : [Rule name='Testing contains']

If I rewrite the rule using "||" explicitly I get the same error.

This didn't happen under 5.1.1.

I'm aware that 5.2.0-SNAPSHOT is a...um...work in progress.  :-)  But the
DRL compilation has worked up till now.  Is my rule syntax OK?  Do I just
need to wait?

Best,
Laird

--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-5-2-0-SNAPSHOT-drl-broken-tp2724780p2724780.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list