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

 


NOTICE: If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing.