[rules-users] Compilation error: "Syntax error, insert "; " to complete BlockStatements "

Kris Nuttycombe kris.nuttycombe at gmail.com
Thu Jul 10 11:00:34 EDT 2008


Well, now I feel dumb. :) I finally figured out that I'd actually been
looking at the wrong rule. I'm still a bit confused, though - what
dictates whether or not a semicolon is required at the end of the
line? In looking at a lot of the example code (for example,
PetStore.drl) the placement of semicolons seems pretty haphazard, and
I haven't been able to find where in the documentation that is
covered.

Thanks for your help,

Kris.

On Thu, Jul 10, 2008 at 6:15 AM, Scott Burrows <scottjburrows at gmail.com> wrote:
> Kris,
>
> You need a semicolon at the end of the addCharge statement.
>
> Scott Burrows
>
>
>
> On Wed, Jul 9, 2008 at 3:59 PM, Kris Nuttycombe <kris.nuttycombe at gmail.com>
> wrote:
>>
>> Hi, all,
>>
>> I'm new to Drools, and am a bit confused by the compilation error that
>> I'm getting. From the line number, it appears to be in a generated
>> Java file instead of in my rules file, so I'm having a hard time
>> debugging the issue. Here is the full error:
>>
>> Rule Compilation error : [Rule name=Assert Total Accumulator for
>> Order, agendaGroup=init, salience=0, no-loop=false]
>>  com/gaiam/gcsi/rules/Rule_Assert_Total_Accumulator_for_Order_0.java
>> (7:429) : Syntax error, insert ";" to complete BlockStatements
>>
>>
>> Here is the rule that's being referred to:
>>
>> rule "Add charge amounts to total."
>>    agenda-group "calc_total"
>> when
>>    $total : Total()
>>    $event : ProgramBillingEvent( $amount : amount)
>> then
>>    modify( $total ) {
>>        addCharge($event, $amount)
>>    }
>> end
>>
>> I'm working from the example modify block discussed in the docs at
>>
>> http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html/ch02s05.html#d0e961
>> - I haven't been able to find other documentation referring to this
>> construct.
>>
>> What am I doing wrong?
>>
>> Thanks,
>>
>> Kris
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>



More information about the rules-users mailing list