[rules-users] ArrayList in Guvnor 5.1 M2

james corrigan jamescorrig at gmail.com
Thu Jul 29 18:28:45 EDT 2010


Hi All

I have built the following rule in version 5.0 with no errors:

rule "When average temperature is greater than 19"
lock-on-active true
       when
           $t : ArrayList() from
collect(Temperature())                              //store all temperature
objects in an arraylist
           $average: Number(doubleValue>19) from
                     accumulate(Temperature($val:value),average($val))
//calculate the average temperature
           $f : ArrayList() from collect(Fan())

       then
           System.out.println($average);
           turnOnFans($f);   //function  -> send arraylist of fan objects to
function
end


but when i try to build in version 5.1 i get a
java.lang.ArrayStoreException.

Any help much appreciated.

Kind regards,
James.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100729/9d59fef0/attachment.html 


More information about the rules-users mailing list