[rules-users] Trouble getting Dynamic Salience working

Michal Bali michalbali at gmail.com
Tue Sep 1 18:39:13 EDT 2009


does this work?
salience ( return getSalience() )

or this:

salience ( getSalience();)


On Tue, Sep 1, 2009 at 6:50 PM, Bill Tarr <javatestcase at yahoo.com> wrote:

> 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
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090901/893f7848/attachment.html 


More information about the rules-users mailing list