[rules-users] List from collection -> bug?

Evert Penninckx evert.penninckx at gmail.com
Fri Oct 8 10:38:38 EDT 2010


The drools user guide contains this example:

when
    $assessment : Assessment()
    $p : Person()
    $addresses : List() from $p.addresses
    exists (Address( state == "NC") from $addresses) 
then
    modify ($assessment) {} #Modify assessment in a modify block
end

I derive from this that $addresses is a list. But when I add a
System.out.println($addresses.getClass().getName()) I get "Address" as
result

Also, when I want to use $addresses as a list in the consequence (eg.
.size() ), I get java.lang.IllegalArgumentException: object is not an
instance of declaring class.


Is this expected behaviour?


Evert




-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/List-from-collection-bug-tp1665781p1665781.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list