Eval's are indeed less performatic than any other type of constraints.
"inline-evals" are not as bad, but are also heavier than regular
The recommendation is to avoid when possible, but for some cases it is
If you are using MR3 or later, you can use MVELs syntax in your
MyClass( aMapAttribute['aKey'] == "some Value" )
The above will transparently be translated to an inline-eval, but that
is the best you can do when working with maps.
2007/7/2, Rajesh_Kumar <Rajesh_Kumar(a)rsystems.com>:
I want to use "eval" in my rules, but in rule writing guidelines Mark
Written that "Eval is Evil".
I want to compare the values of Hash Map in my when (conditions) part.
1) Will anyone suggest something so that I can compare Hash Map keys in
2) Does is there any performance related issue related to "eval";
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
rules-users mailing list
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com