You want this rule to fire if there are less than 90 measurements labelled "active movement" in the
last 7*24*60 measurements?
The only thing I can spot is incorrect syntax in the second accumulate:
from accumulate(MertAdat(sorszam > ($max_sorszam - 7 * 24 * 60), $cimke : cimke == "aktiv_mozgas"),
The required imports are as usual: all the classes you refer to in the rule, Adattypus and MertAdat.
If there are more problems, please post the error message(s).
-W
Hi!
I would like to use the accumulate function in my rule. I found this:
http://www.docjar.com/html/api/org/drools/compiler/PackageBuilderConfiguration.java.html
but i don't know exactly, which imports I need to the package and how can I
make it work.
This is my rule:
rule "aktivitas"
when
Adattipus(ertek == "mozgas")
$max_sorszam : Number()
from accumulate(MertAdat($sorszam : sorszam),
max($sorszam))
$aktiv_mozgas_cimke_szam : Number(intValue < 90)
from accumulate(MertAdat(sorszam > $max_sorszam - (7
* 24 * 60), $cimke : cimke == "aktiv_mozgas"),
count($cimke))
then
end
Sorry for this simple question!
--
View this message in context: http://n3.nabble.com/accumulate-function-help-tp67445p67445.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users