[rules-users] please provide a rule for events timeout cases

skatta1986 shivaprasad_gdk at yahoo.co.in
Mon Apr 16 09:24:02 EDT 2012


Hi, Thanks for the response..

This is working fine.. But I have a query on the rule:
rule no_response 
   timer( int: 10s ) 
when 
   EventRecord( type=EventRequest, id=1 ) 
   not EventRecord( type=EventResponse, id=1 ) 

In general timer means executing a thread for every specified time period
interval. But in our case, one time would be enough for an event. In the
above rule my query is - after timeout case (i.e., firstime 10 seconds from
the EventRequest), timer thread will be closed or will it be still running?

Second Query is:

Consider the below Success rule:
rule event_success_case 
 when 
   EventRecord( type=EventRequest, id=1 ) 
   and EventRecord( type=EventResponse, id=1 ) 

With "no_response" rule, for every EventRequest there is a timer thread
running for every 10Sec. Second rule "event_success_case" looks for its
EventResponse. Suppose with in 10 seconds there is a response then
"event_success_case" rule is run. Now I would like to close the timer thread
because it uses my system memory. Please let me know if this is possible.


--
View this message in context: http://drools.46999.n3.nabble.com/please-provide-a-rule-for-events-timeout-cases-tp3907955p3914382.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list