[
https://issues.jboss.org/browse/DROOLS-586?page=com.atlassian.jira.plugin...
]
Edson Tirelli commented on DROOLS-586:
--------------------------------------
Sorry for the delay.
This behaviour was changed back in Drools 5.1 because of the confusion it was creating and
how hard was for users to understand if an event should be in memory or not. The ticket
was this:
https://issues.jboss.org/browse/JBRULES-2578
After the change, the expiration policy, if it is define, explicitly defines for how long
an event will be retained in memory. In case the user prefers the engine to calculate it,
then no expiration policy should be set.
Unfortunately, as you pointed out, the documentation was not completely updated leading to
the confusion. I now updated the documentation accordingly:
https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/fafb489e2de286c...
Sorry for the confusion.
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)
Affects Versions: 6.1.0.CR2, 6.2.0.Beta1
Environment: Linux, Java SE 1.7
Reporter: kairat kushaev
Assignee: Edson Tirelli
Priority: Critical
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?
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)