[rules-users] Question about custom accumulation functions

Edson Tirelli ed.tirelli at gmail.com
Wed Aug 24 10:21:58 EDT 2011


   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>

> 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
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110824/7dcabce0/attachment.html 


More information about the rules-users mailing list