Yes, I was quite surprised when the DRL compilation accepted the MVEL-ishly<br>written function with dialect "mvel" preceding it. I thought that there was some<br>undocumented development. So, why does it go the way it does? <br>
<br>-W<br><br><div class="gmail_quote">On 21 March 2012 21:32, Mark Proctor <span dir="ltr"><<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
functions can only be written in Java.<br>
<br>
There is no support for MVEL dialect in functions.<br>
<br>
Mark<br>
On 21/03/2012 03:37, barnesjd wrote:<br>
> Correction.... I didn't paste the whole function the second time. I do have<br>
> a return for the else...<br>
><br>
> /function int englishToInt(String englishNumber)<br>
> {<br>
> Map m = ["one":1, "two":2, "three":3, "four":4, "five":5];<br>
> Object obj = m.get(englishNumber.toLowerCase());<br>
><br>
> if(obj != null)<br>
> return Integer.parseInt(obj.toString());<br>
> else<br>
> return -1;<br>
> }/<br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://drools.46999.n3.nabble.com/Trouble-with-the-MVEL-Map-syntax-tp3844609p3844617.html" target="_blank">http://drools.46999.n3.nabble.com/Trouble-with-the-MVEL-Map-syntax-tp3844609p3844617.html</a><br>
> Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> rules-users mailing list<br>
> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>