[rules-users] Drools infixOr with a from Collection Not Working???

Carlsen, Len len.carlsen at ubc.ca
Wed Jun 25 21:49:10 EDT 2008


Hi,

 

I have a rule with an infixOr and an infixAnd that test for objects in a
collection which doesn't execute even though it should.

 

# This rule will not execute even though it should

rule "FAIL_AorBandC"

      when

         test : TestClass( string=="TEST" )

         

         ( TestClass( string == "A" ) from test.list

         or

         TestClass( string == "B" ) from test.list )

         and

         TestClass( string == "C" ) from test.list

      then 

            System.out.println( "FAIL_AorBandC: " + test.getString() );

end

 

All other combinations of ANDs and ORs such as (A and B) or C, (A or B),
(A or B) or C will work except the one above if a from collection is
used.

(A or B) and C will work if a from collection is not used.

Has anyone come across this? Is this a bug?

 

Thanks,

 

Len

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080625/a4fe59bc/attachment.html 


More information about the rules-users mailing list