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

skatta1986 shivaprasad_gdk at yahoo.co.in
Thu Apr 19 13:54:42 EDT 2012


Could you please help out me in this...

modified rules: But it is giving thread exception at runtime

rule event_success_case 
 when 
    $req : EventRecord( type=EventRequest, user="katta" ) 
    and $resp : EventRecord( type=EventResponseSuccess, user="katta",  this
after[0s, 10s] $req ) 
    and ( not (EventRecord( type=EventResponseSuccess, user="katta",  this
after[0s, 10s] $req , this before[0s, 10s] $resp)))
    #and ( not (EventRecord( type=EventResponseSuccess, user="katta", $req
overlaps this, this overlaps $resp) ))
 then 
   System.out.println("Success case for user " + $req.getUser()); 
    retract($req); 
 end 
 
rule event_failure_case 
 when 
    $req : EventRecord( type=EventRequest, user="katta" ) 
    and EventRecord( type=EventResponseFailure, user="katta",  this
after[0s, 10s] $req ) 
    and ( not (EventRecord( type=EventResponseFailure, user="katta",  this
after[0s, 10s] $req , this before[0s, 10s] $resp)))
    #and ( not (EventRecord( type=EventResponseFailure, user="katta", $req
overlaps this, this overlaps $resp) ))
 then 
   System.out.println("Failed case for user " + $req.getUser()); 
   retract($req); 
 end 

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



More information about the rules-users mailing list