]
Davide Sottara commented on DROOLS-586:
---------------------------------------
It's confirmed, we are investigating
Drools doesn't calculate maximum expiration time properly
---------------------------------------------------------
Key: DROOLS-586
URL:
https://issues.jboss.org/browse/DROOLS-586
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: Linux, Java SE 1.7
Reporter: kairat kushaev
Assignee: Mark Proctor
Fix For: 6.1.0.Final
Hello guys,
we found some contradiction between actual Drools behavior,
We use the following Rule:
import drools.test.Event;
dialect "mvel"
declare Event
@role(event)
@expires(10s)
end
rule "ExampleRule"
when
( $a : Event(name == "event a") ) and
( $b : Event((name == "event b") && (this after [1ms, 15s] $a)) )
then
System.out.println("bingo!");
end
In the code above Drools should wait for the second event when the first event came. But
it turns out that Drools doesn't wait for the second event because of @expires tag.
The value in this tag is less than this after value.
According to documentation
"The engine will make this analysis for the whole rulebase and find the offset for
every event type. Whenever an implicit expiration offset clashes with the explicit
expiration offset, then engine will use the greater of the two."
but it is not calculating maximal expiration offset. Also we are using STREAM mode.
Could you please clarify the situation?