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.
2011/8/24 Bruno Freudensprung <bruno.freudensprung(a)temis.com>
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?
rules-users mailing list
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com