[rules-users] Getting Exception while running rules continuously on the Event Streams from Mule Component.

Hari Kishan HariKishan.Tammana at pass-consulting.com
Wed Sep 28 05:50:03 EDT 2011


@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)
	
	/*$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() )*/     						    						
	eval($alarms!=null)							  									  								   											
then 
...........


--
View this message in context: http://drools.46999.n3.nabble.com/Getting-Exception-while-running-rules-continuously-on-the-Event-Streams-from-Mule-Component-tp3372189p3375564.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110928/25073206/attachment.html 


More information about the rules-users mailing list