Hi,
  I'd like to use keyword collect to do my filtering but its behaviour confused 
me, please advise. I greatly appreciate your help.
   
  Problem 1:
   
  when
  eventList : LinkedList(size == 5)
  from collect( Event(text matches ".*rule5.*" ))
  
  then
  System.out.println("rule5 is fired " + eventList.size());
   
  I still do not see any log msg after adding 5+ events. Is something wrong 
with my rule?
   
  Problem 2:
   
  when
  event: Event(text matches ".*rule5.*" ))
  eventList : LinkedList(size == 5)
  from collect( Event(text == event.text)
  
  then
  System.out.println("rule5 is fired " + eventList.size());
   
  After adding 5 events, I see 5 log msg instead of one as I'd expect.
  If I add more events, I will see more log. How do I tell LHS  to reset the 
count from 0.
  Basically, I want to take 1 event out of 5 similar events (suppressing 
filtering). So if there are 10 similar events, my RHS should activate 2 times, 
not 10 times.
   
  Thanks,
  -av
   

       
---------------------------------
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. 
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to