Something like this (not tested):
rule "clear the event"
when
$msg: Message($eventName:eventName ,$host: hostName) from entry-point
$event: Myevent(eventName == $eventName,hostName == $host)
not Message( this after[5m] $msg )
then
retract( $event);
end
On 08/08/2013, samsonrithvik <samsonrithvik.cts(a)gmail.com> wrote:
How do i destroy the events in dsl ..when i no longer needed it
for example
this is my sample .drl file
rule "setting the event"
no-loop
when
$msg : Message($eventName:eventName ,$host: hostName) from entry-point
myevent
not $event:Myevent(eventName == $eventName,hostName == $host)
then
insert(new Myevent($eventName,$host));
end
Now how do i destroy the event Myevent when i'm not getting any message
from
that entry-point after certain amount of time
--
View this message in context:
http://drools.46999.n3.nabble.com/Destroy-the-events-tp4025418.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users