title: Drools variable binding: reassignment not allowed
body: <p>Assume that <code>MyObject</code> is a Java Object with an integer property called <code>integerProperty</code>. 
  I would like to write a Drools rule like the following (syntactically incorrect):</p>
  
  <pre><code>rule "myRule"
      when
          MyObject( $integerProperty : integerProperty )
          accumulate(
              $o : MyObject( 
                  integerProperty == $integerProperty + 1,
                  $integerProperty : this.integerProperty
                  );
              $total : count($o);
              $total &gt; 10
              )
      then 
          [BLABLABLA]
  end
  </code></pre>
  
  <p>I want to fire my rule when there is a set of more than 10 elements of type <code>MyObject</code> whose <code>integerProperty</code> values form an arithmetic sequence, e.g. <code>1</code>, <code>2</code>, <code>3</code>, … In this case, I will assign a negative value to an <code>HardMediumSoftLongScore</code> object (hoping that information this helps).</p>
  
  <p>I am sure that an <code>MyObject</code> having a given <code>integerProperty</code> is unique (eg. there is just one <code>MyObject</code> having <code>integerProperty</code> equal to, say, <code>2</code>). The problem is that I'm not allowed to re-assign the variable binding <code>$integerProperty</code>. Is there a way around this? </p>