Hi all:

I have a Guvnor Repository with same rules.

Then, I have a web application with a KnowledgeAgent. The agent has the "drools.agent.newInstance" property in "false", to update the KnowledgeStatefulSession with every change in the KnowledgeBase, and the scanning interval setted in 10 seconds.

In my rules, I use temporal operator of Fusion with "befores" and "afters", and time intervals.

In my web application I have a long running KnowledgeStatefulSession and I use an AgendaEventListener to fire rules in every activationCreated() event.

My problem is that in each KnowledgeBase update, the session cancels all the activations created and then creates all activations cancelled again. I see this because I have a logger in each method of the AgendaEventListener instance.

If I had a rule of this style in progress:

rule "Basic Rule"
dialect 'mvel'
when
    $eventA: EventA($aId: id) from entry-point "time stream"
    not EventB($aId == id, this after [0s,5m] $eventA) from entry-point "time stream"
then
    System.out.println("Event A " + $aId + " at " + $eventA.timestamp);
end

And this rule had been activated 2 minutes ago... When the KnowledgeAgent updates the KnowledgeSession, after a KnowledgeBase update from Guvnor, the time intervals resets to zero. I guess it must be because the agent cancels the activations and creates them again.

The result is that the System.out fires 7 minutes after the event was inserted... 2 minutes later.

I hope you have understood me, despite my english.

Thanks!!

Adrian

--
Epidata Consulting | Deploying Ideas
Ing. Adrián M. Paredes | Arquitecto Desarrollador
adrianp@epidataconsulting.com | Cel: (54911) 3297 1713
----------------------------------------------------------------------------------------------------------------------------
Argentina: Maipú 521 Piso 1 Of. A | Buenos Aires | Of: (5411) 5031 0060
Chile: Apoquindo 3600 Piso 7 y 9 | Las Condes - Santiago | Of: (+56) 2 495 8450
---------------------------------------------------------------------------------------------------------------------------