title: How to call Groovy script from Scala?
body: <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
   &lt;facts&gt;    
      &lt;fact id="ItemPrice" displayName="Item Price"&gt;
      &lt;defaultValue&gt;0&lt;/defaultValue&gt;
      &lt;script&gt;&lt;![CDATA[ 
              Double Value_Sales= 500;
              Double Unit_Sales= 10;
              Double res=Value_Sales/Unit_Sales;
              return res;
      ]]&gt;&lt;/script&gt;
  &lt;/fact&gt;
  &lt;/facts&gt;
  </code></pre>
  
  <p>Above is the sample groovy script written in xml file for finding item price.</p>
  
  <p>Java code for processing Groovy:</p>
  
  <pre><code>List&lt;Fact&gt; factList = NREUtils.readXml("/SampleDictionary.xml") //cutome API
  GroovyShell shell = new GroovyShell();
  String scriptStr = factList.get(0).getScript();
  Script groovyScript = shell.parse(scriptStr); // return "ItemPrice" script 
  Binding binding = new Binding();
  groovyScript.setBinding(binding);
  Object val = groovyScript.run(); // **Result will be 50**
  </code></pre>
  
  <p>I would like the corresponding Scala code for the same.</p>