[rules-users] Guvnor - How to define custom accumulate function

Srinivasan Muthu srinivasanm at vmware.com
Mon Dec 29 17:38:05 EST 2008


I have a custom accumulate function written in java which I use in my rules.
To make this work in eclipse, I had to define this function in
drools.packagebuilder.conf file and put that in the root of the project. 

 

Drools.packagebuilder.conf file content:

drools.accumulate.function.groupCount =
com.company.analysis.accumulators.GroupByAccumulateFunction

 

When I try the same in guvnor, I am not sure where to define this custom
function (similar to drools.packagebuilder.conf file) so that my rules will
get built into a package. Currently when I build the package from guvnor, I
get the following error:

 

Unable to build expression for 'accumulate' : No accumulator function found
for identifier: groupCount

 

This is because the drl file doesn't know how to interpret the "groupCount"
function as its not defined anywhere.

 

I looked up the documentation and the mailing list and couldn't find any
solution. I also tried importing the whole drools.packagebuilder.conf file
into guvnor and that doesn't seem to work as well.


Thanks for your help,

Srini

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081229/9a432887/attachment.html 


More information about the rules-users mailing list