Bug 998930 - Not possible to register custom accumulate functions
Summary: Not possible to register custom accumulate functions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: manstis
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-20 11:08 UTC by Jiri Locker
Modified: 2015-12-09 14:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Add support for custom accumulate functions in Drools Workbench. Reason: Result (if any):
Clone Of:
Environment:
Last Closed: 2015-12-09 14:49:34 UTC
Type: Feature Request
Embargoed:


Attachments (Terms of Use)

Description Jiri Locker 2013-08-20 11:08:51 UTC
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 14:15:52 UTC
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-10-01 00:36:33 UTC
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.