Hello,
I am using Drools with Guvnor and Drools Fusion. I have application
that read data from sensors and after each read insert event to
StatefulKnowledgeSession. I have some basic rules that works.
Now I need to detect when one of sensor parameter change by some value
between reads from given sensor, e. g.
Lets say I want to detect when power rise by more then 2:
4 sensor reads (4 events inserted to session)
1. power=0.9
2. power=1
3. power =4 --> rule should detect that fact (4-1=3 ; 3>2)
4. power = 2
I do not now how to get access to previous reads in rule to do
subtraction (4-1=3). Any advice appreciated.
Thanks,
Bartek