Yes, I was quite surprised when the DRL compilation accepted the MVEL-ishly<br>written function with dialect &quot;mvel&quot; 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">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</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>
&gt; Correction.... I didn&#39;t paste the whole function the second time.  I do have<br>
&gt; a return for the else...<br>
&gt;<br>
&gt; /function int englishToInt(String englishNumber)<br>
&gt; {<br>
&gt;       Map m = [&quot;one&quot;:1, &quot;two&quot;:2, &quot;three&quot;:3, &quot;four&quot;:4, &quot;five&quot;:5];<br>
&gt;       Object obj = m.get(englishNumber.toLowerCase());<br>
&gt;<br>
&gt;       if(obj != null)<br>
&gt;               return Integer.parseInt(obj.toString());<br>
&gt;       else<br>
&gt;               return -1;<br>
&gt; }/<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; 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>

&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <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>