[rules-users] Why this rule fires immediately ?

Wolfgang Laun wolfgang.laun at gmail.com
Wed Oct 19 06:35:04 EDT 2011


You'd have to insert the new ZZZTracker in the first rule.

But this does not compute the average over three values in a *sliding *window;
you'd compute the average for every *adjacent *window of three events.

Stay with the original rule, but use a "Tracker" for counting valid
ZZZSensorBeans, and add another pattern to the original rule: the suitable
Tracker must have a count >= 3.

-W

On 19 October 2011 12:28, eskomk <esko.hujanen at ebsolut.fi> wrote:

> Hi all,
>
> Sorry, the first rule should read:
>
> when
>    $mds : ZZZSensorBean(temperature > 30)
>    not ZZZTracker(profileID == $mds.profileID)
> then
>    ZZZTracker $tracker = new ZZZTracker();
>    $tracker.profileID = $mds.profileID;
> end
>
> br Esko
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Why-this-rule-fires-immediately-tp3430427p3433905.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111019/2da9e946/attachment.html 


More information about the rules-users mailing list