title: Declare local rule variable using Drools
body: <p>It's possible to create a local variable into a local rule definition using Drools rule engine?</p>
  
  <p>I wrote an example code, but it's not compiling. This example is just to expose the idea about  local declaration (I know that it's wrong)</p>
  
  <pre><code>/*...*/
      rule "Test local Variable"
          when
              String $departmentName = "Music";
          then
              System.out.println($departmentName);
      end
  /*...*/
  </code></pre>
  
  <p>The error message is:</p>
  
  <pre><code>org.drools.CheckedDroolsException: There were errors in the rule source: [ERR 101] Line 25:2 no viable alternative at input 'String' in rule "Test local Variable"
  </code></pre>
  
  <p>The position [25,2] is defined by line:</p>
  
  <pre><code>String $departmentName = "Music";
  </code></pre>