[rules-users] accumulate function not registered

rogerL roger at precipicetech.com
Wed Jun 18 16:26:57 EDT 2014


After upgrade to 6.1.0.CR1 rule compilation is generating a pluggable
accumulate function registration error.

Partial stack dump:
Caused by: java.lang.RuntimeException: Error while creating KieBase[Message
[id=1, level=ERROR,
path=com/s/c/manager/rules/campaign/priority/prioritize.drl, line=31,
column=0
   text=Unknown accumulate function: 'topPriority' on rule 'Insert highest
priority campaign'. All accumulate functions must be registered before
building a resource.], Message [id=2, level=ERROR,
path=com/s/c/manager/rules/campaign/priority/prioritize.drl, line=31,
column=0
   text=Rule Compilation error $tc cannot be resolved to a variable]]

The associated rule and accumulate import are:

import accumulate com.s.c.util.HighestPriorityCampaignAccumulateFunction
topPriority;

rule "Insert highest priority campaign"
when
    not TopCampaign()
    accumulate(TargetCampaigns($list : list, list.size >0), $tc :
topPriority( $list ) )
then
    insert(new TopCampaign($tc));
end

Is this syntax no longer correct?



--
View this message in context: http://drools.46999.n3.nabble.com/accumulate-function-not-registered-tp4030102.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list