[rules-users] Trouble getting Dynamic Salience working

Bill Tarr javatestcase at yahoo.com
Tue Sep 1 13:50:26 EDT 2009


Possibily just a simple MVEL error, but I've been struggling for a while and thought I'd see if anyone could help.
 
I just want to run a logic test to determine salience for some rules I am generating with rules-templates.  Even after making the logical test "true" I can't get any of variation to compile.
 
(true ? "1000" : "0")
**produces**
Unable to build expression for 'salience' : not a statement, or badly formed structure
 
( true ? 1000 : 0)
**produces**
Unable to build expression for 'salience' : invalid number literal: 1000
 
salience ( getSalience() )
...
function int getSalience(){return 0;}
**produces**
Unable to build expression for 'salience' : org.mvel2.util.MethodStub cannot be cast to java.lang.Class'( getSalienceNONCDW() )'
 
Seems like I am missing something simple, but I've tried many variations on the above, and have been unable to find any working examples of using a logical test in salience, so if anyone has any direction it would be greatly appreciated.
 
Thanks!
 
Bill


      




More information about the rules-users mailing list