On 11 November 2010 04:16, Ayush <ayush.vatsyayan(a)alcatel-lucent.com> wrote:
Thanks for your reply.
Also let me know about facts which are loaded into working memory (Keeping
in mind that I'm not calling session.dispose()).
Where should I define their expiry time or how should I retract them after 5
minutes?
You declare the class to represent an event and set the expiry time.
import ...MyEventType
declare MyEventType
@role( event )
@expires( 5m )
end
Or you could catch them with a one-shot timer rule where other actions
besides retract would be possible.
rule "kill after 5m"
timer(int: 5m)
when
$f: SomeType()
then
// other actions?!
retract( $f );
end
Using a suitable interface or supertype may reduce the number of
required rules.
-W
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Removing-facts-from-s...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users