[rules-users] Question about custom accumulation functions
Bruno Freudensprung
bruno.freudensprung at temis.com
Wed Aug 24 10:39:40 EDT 2011
Thanks for the explanation Edson!
That's fine. In the meantime we will do our best to pre-compute the most
we can in accumulate() ;-).
Best regards,
Bruno.
Le 24/08/2011 16:21, Edson Tirelli a écrit :
>
> Yes, evaluation is incremental, so for every new fact, it will call
> accumulate() and getResult().
>
> We do want to reduce the calls to getResult(), improving
> performance, but it is not easy to figure out a way, as from an engine
> perspective, it never knows when the application is done inserting
> facts and it is time to calculate the final result.
>
> Edson
>
> 2011/8/24 Bruno Freudensprung <bruno.freudensprung at temis.com
> <mailto:bruno.freudensprung at temis.com>>
>
> Hi,
>
> While testing my custom accumulation function I noticed an unexpected
> behavior (th'ats of course a personal point of view).
> It seems that Drools 5.1 calls accumulate(...) and getResult(...) as
> many times as the number of accumulated facts (accumulate, getResult,
> accumulate, getResult, etc...).
> Is it supposed to work like this?
>
> Best regards,
>
> Bruno.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> --
> Edson Tirelli
> JBoss Drools Core Development
> JBoss by Red Hat @ www.jboss.com <http://www.jboss.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/20110824/7b2da91b/attachment.html
More information about the rules-users
mailing list