[rules-users] Using DSL and accumulate in Drools BRMS leads to unexpected results

pentarious cristiano.giuffrida at gmail.com
Tue Sep 11 06:48:50 EDT 2007


Hi,
I'm using the following DSL:
[when]There are at least {N} objects in the domain=Number(intValue>={N})
from accumulate ( i : Object(), count( i ) )
[when]- category is {Category}=category== "{Category}"

Using the above DSL from Drools BRMS leads to the following result (rule
source code):
Number(intValue>=10) from accumulate ( i : Object(), count( i,
category=="CATEGORY") )

Of course this is not the expected behavior. This should lead to something
like:
Number(intValue>=10) from accumulate ( i : Object(category=="CATEGORY"),
count( i) )

I have no such a problem when using the same approach with a collect
statement, i.e. the following source code is generated:
ArrayList() from collect ( Object(category=="CATEGORY") )

Is it a bug?

Regards,

CG
-- 
View this message in context: http://www.nabble.com/Using-DSL-and-accumulate-in-Drools-BRMS-leads-to-unexpected-results-tf4421763.html#a12612164
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list