[rules-users] @expires

Wolfgang Laun wolfgang.laun at gmail.com
Wed Oct 3 14:49:50 EDT 2012


A timer should accomplish this. If the event disappears for some other
reason, this activation is cancelled, too.

rule kill
timer( 20s )
when
    $e:Event(connectionEventType == ConnectionEventType.CLOSE)
then
   retract( $e );
end

-W


On 3 October 2012 19:59, gboro54 <gboro54 at gmail.com> wrote:

> Based on testing expiring an event does no remove it from working memory.
> What is the best way to manage working memory in the case that after a
> period of X seconds you want the event removed? Would you simply write a
> rule that would do a retract after a certain window i.e
>
>
> rule "Closed Connection Occured"
>         when
>                 $e:Event(connectionEventType == ConnectionEventType.CLOSE
> this after [20s]
> this)
>         then
>                 retract($e);
> end
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/expires-tp4020117.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121003/15f267a1/attachment-0001.html 


More information about the rules-users mailing list