Hi,
I have a Map object that maps User product type experience
with the level of expertise. I am trying to use accumulate in my rule
Such that if the user has experience with certain product
then it gets the experience level and sums it up .
I am using Drools 5.1 , mvel 2, spring batch 2.x.
This is my rule :-
rule "Insert Product Types"
dialect "mvel"
salience 1800
when
eval (true)
then
ProductType p1 = new ProductType();
p1.setName("P1");
ProductType p2 = new ProductType();
p2.setName("P2");
insert (p1);
insert (p2);
end
rule "Product Class
Experience"
dialect "mvel"
salience 1600
when
ProductType ($name :
name)
$total : Number () from accumulate (
Client (productExperience.keySet contains $name, $score :
productExperience[$name]),
sum($score))
then
System.out.println ("Product
Type Score " + $total);
End
When
the rule is fired I get the attached exception .
Any
suggestions / help will be great.
Regards,
Akash