@wolfgang
Yesterday you told me to use accumulate instead of collect.
But i could not find the right way to use accumulate here.
Please see below my rules when condition [ collect function(Bold & Italic) ] and please tell me how can i use accumulate there. If possible change the conditional element to accumulate with appropriate changes.
when
        // "Sensor Data Idem Stream" is where Mule sends the Sensordata facts
// for each Alarm / Sensordata combination that is identified via the vehicle id
$sd : SensorDataIdem ($vid : vehicleId) from entry-point "Sensor Data Idem Stream"
                                                
        // Set a references for later on the initial facts
$av : AlarmVehicle(vehicleId == $vid)                
                                                                         
        //The Condition to be added to get the active Alarms from the List of Alarms
        eval($av!=null && $av.getAlarms()!=null && $av.getAlarms().size()>0)
        
        <i><b>$alarms : ArrayList(size>0) from collect (
                Alarm(
                                (
                                        (activation == AlarmConstants.ALWAYS_ACTIVE)
                                || (activation == AlarmConstants.ACTIVE_ONLY_ONTOUR && $sd.onTour == true)
                                || (activation == AlarmConstants.ACTIVE_ONLY_NOT_ONTOUR && $sd.onTour == false)
                                || (activation == AlarmConstants.ACTIVE_ONLY_ONMOVING && $sd.onMove == true)
                                || (activation == AlarmConstants.ACTIVE_ON_TIME_WINDOW )
                                )
                                &&
                                (         
                                        (
                                        (geofenceCustomer == 0)
                                || (geofenceCustomer == 1 && $sd.inCustomerGeoFence == true)
                                || (geofenceCustomer == 2 && $sd.inCustomerGeoFence == false)
                                        )
                                        &&
                                        (
                                        (geofenceDepot == 0)
                                || (geofenceDepot == 1 && $sd.inDepotGeoFence == true)
                                || (geofenceDepot == 2 && $sd.inDepotGeoFence == false)
                                        )
                                )
                        )
                from $av.getAlarms() )</b></i>                                                                                                  
        eval($alarms!=null)                                                                                                                                                                                                                                                                                           
then
...........
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://drools.46999.n3.nabble.com/Getting-Exception-while-running-rules-continuously-on-the-Event-Streams-from-Mule-Component-tp3372189p3375564.html">Re: [rules-users] Getting Exception while running rules continuously on the Event Streams from Mule Component.</a><br/>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools: User forum mailing list archive</a> at Nabble.com.<br/>