Have you tried using the accumulate function?
//taken from the link below and modified a bit to use count.. (it is
untested)
rule "Count the number of items in the order"
when
$order : Order()
$total : Number( )
from accumulate( OrderItem( order == $order), count( ) )
then
System.out.println("There are "+$total+ " number of items in the
order");
end
http://docs.redhat.com/docs/en-US/JBoss_Enterprise_SOA_Platform/4.3/html/...
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-and-ArrayList-tp3140821p3141665....
Sent from the Drools: User forum mailing list archive at
Nabble.com.