title: How to refer session variables in Groovy script in mule studio
body: <p>I just started working with Mule.
  Flow description: 
  I have an HTTP inbound endpoint receive XML message, and I Hvae to update the database (derby) using the XML payload.
  Ex: I will be receiving Emp Id and Emp name, Exp in the request. I have to update the table with these values.</p>
  
  <p>My Implementation:</p>
  
  <p>After receiving XML input I am using the message Property transformer to save the values in Session scope.</p>
  
  <pre><code> &lt;message-properties-transformer scope="session" doc:name="Message Properties"&gt;    
      &lt;add-message-property key="EmpNum"
                            value="#[xpath:/CreateEmployee/EmpNum]" /&gt; 
   &lt;/message-properties-transformer&gt;
  </code></pre>
  
  <p>like above. And then I have Groovy Script component to update the table.
  My Query is:</p>
  
  <pre><code>r.update(conn, "INSERT INTO Employee values(#[header:session:EmpNum],#[header:session:EmpName],#[header:session:Experience],#[header:session:Role])");
  </code></pre>
  
  <p>But it is throwing error:</p>
  
  <pre>
  Lexical error at line 1, column 29.  Encountered: "#" (35), after : "". (org.apache.derby.iapi.error.StandardException)
    org.apache.derby.iapi.error.StandardException:-1 (null)
   Lexical error at line 1, column 29.  Encountered: "#" (35), after : "". Query: INSERT INTO Employee values(#[header:session:EmpNum],#[header:session:EmpName],#[header:session:Experience],#[header:session:Role]) Parameters: [](SQL Code: 30000, SQL State: + 42X02) (java.sql.SQLException)
    org.apache.commons.dbutils.QueryRunner:540 (null)
  </pre>
  
  <p>I have used a logger component to display the values.</p>
  
  <pre><code>#[header:session:EmpNum]
  </code></pre>
  
  <p>is displaying the proper value.</p>
  
  <p>Please help me how to refer this session values in Groovy script?</p>