Bug 998930 - Not possible to register custom accumulate functions
Not possible to register custom accumulate functions
Status: CLOSED WONTFIX
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: manstis
Jiri Locker
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-20 07:08 EDT by Jiri Locker
Modified: 2015-12-09 09:49 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Add support for custom accumulate functions in Drools Workbench. Reason: Result (if any):
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-09 09:49:34 EST
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jiri Locker 2013-08-20 07:08:51 EDT
Description of problem:
I want to use a custom accumulate function in a rule like this:
  Number( intValue >= 100 ) from accumulate ( p : Person( sex == "M" ), mysum(p.age))

I have commited a properties file registering my implementation of accumulate function like this:
drools.accumulate.function.mysum=org.jboss.qa.brms.accumulate.DoubleSum

Despite of that, when I validate the rule, I'm getting an error:
Unknown accumulate function: 'mysum' on rule 'my rule'. All accumulate functions must be registered before building a resource.

Version-Release number of selected component (if applicable):
ER1

How reproducible:
-

Steps to Reproduce:
1.
2.
3.

Actual results:
Doesn't work.

Expected results:
Should be possible to register a custom accumulate function. Either using a properties file as it used to work in BRMS 5.x, or using some other project-level configuration file, ideally through Workbench UI (Project Editor perhaps?).

Additional info:
Comment 1 manstis 2013-08-21 10:15:52 EDT
Drools Workbench (aka Guvnor) has never had explicit support for custom accumulate functions; that said, I've never tried with 5.x. Can you confirm custom accumulate functions work outside of the web application, i.e. plain DRL.
Comment 2 Edson Tirelli 2013-09-30 20:36:33 EDT
Setting priority to low as this is a nice to have feature, but the focus atm is on fixing bugs.

Note You need to log in before you can comment on or make changes to this bug.