[rules-users] Which proper way to test for Event expiration in Drools Fusion?

tari-manga matteo.mortari at gmail.com
Wed Sep 12 05:38:19 EDT 2012


Ciao, I've used successfully Drools Expert in past project, now I'm
experimenting with Drools Fusion but I can't seem to grasp correctly how
Event expiration works. 

I do understand from the documentation: you must have the knowledge base
setup as STREAM, that you must inject Events in chronological order, and
then for the engine to correctly compute the expiration correctly you must
have defined temporal constraints between Events in the LHS of the rules.

Now let's suppose that for a specific Event there is only 1 rule, and this 1
rule picks the Event from a window of length 1, I would have assumed the
engine would automatically expire all the past Events, with the exception of
not expiring only the last one inserted?

For example:


I have some simple coding by having modified the "Hello World" code
generated by Drools IDE, I have 5.4.0.Final, and documented fully in a 
http://stackoverflow.com/questions/12338385/test-event-expiration-in-drools-fusion-cep
StackOverflow question . The Message is declared as Event, I inject 2 of
them and even if I advance the pseudo clock to the far future, neither of
the Message Event by inspecting the EventHandle seems to be expired==true?

I was expecting the EventHandle for the very first Message Event inserted,
to have expired==true but that is not the case, all the EventHandle have
expired==false and I'm seriously puzzled why?

I was wondering if somebody have a simple example to share where he was
successfully able to inspect all the EventHandle for expiration, or if
anybody can see what I'm doing wrong, please?

Thank you very much in advance. 



--
View this message in context: http://drools.46999.n3.nabble.com/Which-proper-way-to-test-for-Event-expiration-in-Drools-Fusion-tp4019698.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list