Hi again.
First of all, I’m running Drools 5.1.0.SNAPSHOT on Windows and
Eclipse 3.4.
I’ve submitted a Jira Issue (https://jira.jboss.org/jira/browse/JBRULES-2511):
“
I've got a system that receives transactions. I want to
implement the following rules:
- raise an alarm(alarm event) when there aren't any transaction for an hour (or
more);
- if there's an alarm, no more alarms should be raised;
- if there's an alarm and the system receives a transaction, that alarm should
be retracted and the system should send an recovery event.
I've implemented the rules this way:
- ***start*** rule to insert an "EngineStart" event when the rules
engine starts
- ***notrx_after_start*** rule to detect absence of transactions during the
first hour
- ***notrx_after_trx*** rule to detect absence of transactions (during one
hour) after last transaction
- ***rearm*** rule to detect transactions and rearm the system.
I made a Maven project with junits, which inserts transactions at specific
time, in order to raise the desired events.
Two set of tests were made:
- the rules defined in "default" entry-point: the correspondent junit
gives a NullPointerException in DefaultAgenda
- the rules defined in "incoming" entry-point: the correspondent
junit doesn't activate the ***rearm*** rule
“
The issue has an attachment with junits and rules to play with.
T.I.A.
|
Vítor Mendonça Moreira
Analista / Programador
Direcção de Investigação e Desenvolvimento
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt
Uma empresa: Grupo Sousa Pedro
|
|
|
|