You are adding 100 to a non-existing Map entry. Doing this in Java code like e.g.
HashMap<String,Integer> m = $u.getSubjectGradeMap();
m.put( "CompSc", m.get( "CompSc" ) + 100 );
would have thrown a NullPointerException, and you would have seen the problem.
MVEL, with its balmy-barmy way of hiding the realities of programming from you, sinks you in an infinite loop...
Verified with current master, and I won't create a JIRA for this one either, as moticated previously.
-W
Hi, I'm using drools-5.3.0.Beta1. I've following rule definition:
import java.util.*;
declare Student
name : String @key
subjectGradeMap : HashMap
end
rule "Subject grade points"
dialect "mvel"
when
$u : Student()
then
$u.subjectGradeMap["CompSc"] += 100;
System.out.println("Marks added");
end
While executing RHS of above rule, fireAllRules() doesn't return, it hangs.
Please help.
Thanks,
Neel
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users