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.