title: Using declare statement in drl files
body: <p>I am declaring a SensorMode object in the DRL file</p>
  
  <pre><code>declare SensorMode
    modeOffset: Integer
  end
  </code></pre>
  
  <p>I have set the value to modeOffset using</p>
  
  <pre><code>FactType factType=kbase.getFactType("com.yob.pestway.
  valueobjects",  "SensorMode");
  Object nc = factType.newInstance(); 
  factType.set(nc, "modeOffset",sensorDataVO.getModeOffset());
  </code></pre>
  
  <p>I need to use the modeOffset in the following rule,It gives me an error saying $mode.modeOffset is not visible.</p>
  
  <pre><code>rule "Difference in offsets"
  dialect "java"
  no-loop true
  when
      $mode:SensorMode();
      $snrData : SensorDataVO(getWeightOffset().size()&gt;0,
      $initOffset:getInitialOffset());
  then
      System.out.println("---modeOffset---"+$mode.modeOffset);
      update($snrData);
  end
  </code></pre>
  
  <p>Can you please suggest</p>