It compiles without indicating an error.<br><br><div class="gmail_quote">2012/3/21 Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="im">
    On 21/03/2012 20:37, Wolfgang Laun wrote:
    <blockquote type="cite">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>
    </blockquote></div>
    I dont&#39; think it does. All we do is slurp in the text and pass it to
    the JDT compiler. So I doubt the the code below works. i&#39;m looking
    at the JavaFunctionBuilder, I don&#39;t see any pre-processors that
    would enable those inline maps to work.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Mark</font></span><div><div class="h5"><br>
    <blockquote type="cite">
      <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" target="_blank">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" target="_blank">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" target="_blank">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>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<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></blockquote></div><br>