Thanks Manstis<br><br>Actually I found that the issue was caused by me having incorrectly placed the &quot;RuleTable&quot; statement in the spreadsheet, I believe the CONDITION&#39;s in the columns are by default: AND joined.<br>
<br><div class="gmail_quote">On Fri, Sep 9, 2011 at 3:57 PM, manstis [via Drools] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=3323194&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

        Does your &quot;Condition&quot; span the two columns with the payment $param? e.g.<br> <br><span style="font-family:courier new,monospace">|             Condition              | </span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">|-----------------+------------------|</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">|payment &gt; $param | payment &lt;= $param|</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">|-----------------+------------------|</span><br><br>Otherwise you are creating rules that check the following:-<br><br><span style="font-family:courier new,monospace">when</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">Condition(payment &gt; )</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">then</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">...</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">when</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">Condition(payment &gt; 1000)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">then</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">...</span><br style="font-family:courier new,monospace"><br>Whereas you really require:-<br><br><span style="font-family:courier new,monospace">when</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">Condition(payment &gt;0, payment &lt;= 1000)</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">then</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">...</span><br><br>etc<br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><div class="gmail_quote">2011/9/9 john@oa <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3323110&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span><br>

<blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote"><div class="im">Thanks Iaune<br><br>That is really helpful.  Yes, I need the ranges to be mutually exclusive, what is the easiest way to do that?  Feel a bit cheeky asking another question, but you seem to know what you are talking about! I have tried <span style="color:#00681c"></span>adding two conditions to enforce the range, but that doesn&#39;t seem to work - see below.  I still get multiple rules firing.  Also can you recommend any good resources for learning all of this, apart from the online documentation?  Would you know if any of the Drools books are any good?<br>


<br>
 <table border="0" cellpadding="0" cellspacing="0" width="428"><colgroup><col style="width:161pt" span="2" width="214">
 </colgroup><tbody><tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt;width:161pt" height="20" width="214">payment
  &gt; $param</td>
  <td style="width:161pt" width="214">payment &lt;= $param</td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20">Payment Greater Than</td>
  <td>Payment Less Than or Equal To</td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20"><br></td>
  <td>0</td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20">0</td>
  <td>1500</td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20">1500</td>
  <td>2000</td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20">2000</td>
  <td>3000</td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20">3000</td>
  <td>4000</td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20"><br></td>
  <td><br></td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20"><br></td>
  <td><br></td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20"><br></td>
  <td><br></td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20"><br></td>
  <td><br></td>
 </tr>
 <tr style="min-height:15.0pt" height="20">
  <td style="min-height:15.0pt" height="20"><br></td>
  <td><br></td>
 </tr>
</tbody></table><br><br></div><div><div></div><div class="h5"><div class="gmail_quote"><div>On Fri, Sep 9, 2011 at 2:22 PM, laune [via Drools] <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3323074&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>


</div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote"><div>

        The error you get is due to the second condition (application: Application()) not being included in the generated rules. Empty cell means: the column&#39;s snippet is not included in the rule. <br><br>Since you don&#39;t have a constraint for Application() you can employ a trick: remove the column and prefix the text application: Application() to the text in cell C7.<br>



<br>In Rule 1, do you really want to test whether a payment is not greater than zero?<br><br>Do you realize that Rules 2 and 3 would both fire for certain payment amounts?<br><br>You can update a String field. To concatenate, use<br>



   x.setString( x.getString() + &quot;whatever&quot; );<br><br>-W<br><br></div><div class="gmail_quote"><div>On 9 September 2011 14:08, john@oa <span dir="ltr">&lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3322896&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;</span> wrote:<br>



</div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote"><div>Guvnor: guvnor-5.2.0.Final-tomcat-6.0<br>
<br>
Hi<br>
<br>
I am a Drools Newbie and I have an integer field called score that I need to<br>
add to when a rule matches in a spreadsheet decision table.  i.e. the score<br>
field should hold a running total of all scores that are matched.  However,<br>
I can&#39;t even update the field in the table.  I have attached the spreadsheet<br>
for review.  In this spreadsheet I am simply trying to set the score, and<br>
that is failing with:<br>
<br>
DScoringTable] Rule Compilation error application cannot be resolved<br>
<br>
My goal is to have different decision tables that will all need to update<br>
the same score, and keep a running total of the total score.<br>
<br>
Any help very much appreciated!  I hope that I am just missing something<br>
obvious.<br>
<a href="http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls%0Ademo-score-sheet.xls" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls<br>



demo-score-sheet.xls</a><br>
<br>
In future I may wish to also update a String field and keep concatenating to<br>
that field, is this possible?<br>
<br>
John<br>
</div><font color="#888888"><div><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322713.html" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322713.html</a><br>




Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
</div><a href="http://user/SendEmail.jtp?type=node&amp;node=3322896&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a><div><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></font></blockquote></div><br>
<br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=3322896&amp;i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
        
        <br>
        <br>
        </div><hr color="#cccccc" noshade size="1">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322896.html" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322896.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em">
                
                To unsubscribe from Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total, <a rel="nofollow" link="external" target="_top">click here</a>.
        </div></blockquote></div><br>

        
<br></div></div><hr align="left" width="300">
View this message in context: <a href="http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3323074.html" rel="nofollow" link="external" target="_blank">Re: [rules-users] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total</a><div class="im">
<div>
<div></div><div><br>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html" rel="nofollow" link="external" target="_blank">Drools: User forum mailing list archive</a> at Nabble.com.<br></div></div><br>_______________________________________________<br>


rules-users mailing list<br>
<a href="http://user/SendEmail.jtp?type=node&amp;node=3323110&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></div></blockquote></div><div class="im"><br>
<br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&amp;node=3323110&amp;i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
        
        <br>
        <br>
        <hr color="#cccccc" noshade size="1">
        </div><div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><div class="im">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </div><a href="http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3323110.html" target="_blank" rel="nofollow" link="external">http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3323110.html</a>
        </div><div><div></div><div class="h5">
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em">
                
                To unsubscribe from Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.
        </div></div></div></blockquote></div><br>

        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3323194.html">Re: [rules-users] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total</a><br/>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools: User forum mailing list archive</a> at Nabble.com.<br/>