[rules-users] accumulate function help
Wolfgang Laun
wolfgang.laun at gmail.com
Fri Dec 4 04:04:55 EST 2009
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
On Thu, Dec 3, 2009 at 8:04 PM, SzA84 <szepesiandras at citromail.hu> wrote:
>
> 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 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/20091204/5631ebfa/attachment.html
More information about the rules-users
mailing list