[rules-users] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total

john@oa john at openaspect.co.uk
Fri Sep 9 10:45:29 EDT 2011


Thanks Iaune

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 adding
two conditions to enforce the range, but that doesn'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?

 payment > $param payment <= $param  Payment Greater Than Payment Less Than
or Equal To
0  0 1500  1500 2000  2000 3000  3000 4000











On Fri, Sep 9, 2011 at 2:22 PM, laune [via Drools] <
ml-node+s46999n3322896h21 at n3.nabble.com> wrote:

> The error you get is due to the second condition (application:
> Application()) not being included in the generated rules. Empty cell means:
> the column's snippet is not included in the rule.
>
> Since you don'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.
>
> In Rule 1, do you really want to test whether a payment is not greater than
> zero?
>
> Do you realize that Rules 2 and 3 would both fire for certain payment
> amounts?
>
> You can update a String field. To concatenate, use
>    x.setString( x.getString() + "whatever" );
>
> -W
>
> On 9 September 2011 14:08, john at oa <[hidden email]<http://user/SendEmail.jtp?type=node&node=3322896&i=0>
> > wrote:
>
>> Guvnor: guvnor-5.2.0.Final-tomcat-6.0
>>
>> Hi
>>
>> I am a Drools Newbie and I have an integer field called score that I need
>> to
>> add to when a rule matches in a spreadsheet decision table.  i.e. the
>> score
>> field should hold a running total of all scores that are matched.
>>  However,
>> I can't even update the field in the table.  I have attached the
>> spreadsheet
>> for review.  In this spreadsheet I am simply trying to set the score, and
>> that is failing with:
>>
>> DScoringTable] Rule Compilation error application cannot be resolved
>>
>> My goal is to have different decision tables that will all need to update
>> the same score, and keep a running total of the total score.
>>
>> Any help very much appreciated!  I hope that I am just missing something
>> obvious.
>> http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls
>> demo-score-sheet.xls<http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls%0Ademo-score-sheet.xls>
>>
>> In future I may wish to also update a String field and keep concatenating
>> to
>> that field, is this possible?
>>
>> John
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322713.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=3322896&i=1>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> _______________________________________________
> rules-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3322896&i=2>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322896.html
>  To unsubscribe from Spreadsheet: Rule Compilation error (xxx) cannot be
> resolved: Keeping running total, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3322713&code=am9obkBvcGVuYXNwZWN0LmNvLnVrfDMzMjI3MTN8LTIwOTQyNzQ4ODU=>.
>
>


--
View this message in context: http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3323074.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110909/ff6c211c/attachment.html 


More information about the rules-users mailing list