Drools: using rule "exists" for a Map(Scala) -
i have class "records" has map[string,double](scala) attribute "payorders" , want find out whether map contains value larger 50. rule wrote this:
rule "user1" dialect "mvel" no-loop when $user:records($pay:payorders.values) exists(number(doublevalue > 50) $pay) system.out.println("user1") end
the problem there no error rule doesn't work! no outputs. then, tried print $pay
. output $pay:maplike(300.0)
. first thought drools can't analyze type, revised $user:records($pay:payorders.values)
$user:records($pay:payorders.values.tolist)
. still prints nothing. seems once added exists line, rule don't work.
can me? thanks!
Comments
Post a Comment