Drools 10 migration : acc keyword "acc :" binding in DRL fails to compile

11 views
Skip to first unread message

Geeta Dhamak

unread,
Nov 24, 2025, 6:39:16 AM (9 days ago) Nov 24
to Drools Usage

Hello Team,

I came across an inconsistency in Drools (tested in Drools 10.x).We are upgrading drools from 5.3.x to 10.0.0.

In the Drools documentation, example rules frequently show bindings like(above example mentoined in drools 10 documentation :
--------------------------------------------------------

rule "Print balance for AccountPeriod"
  agenda-group "report"
when
  ap : AccountPeriod()
  acc : Account()
then
  System.out.println( acc.accountNo +
                      " : " + acc.balance );
end
-----------------------------------------------------------

Above drl failed with "   text=[ERR 102] Line 201:6 mismatched input ':' in rule "Print balance for AccountPeriod"], Message [id=2, kieBase=rulesBase, level=ERROR, path=**/my.drl, line=0, column=0"


So it seems acc is treated as a reserved/fuzzy keyword, even though it is not listed as a reserved keyword in Drools documentation.
❗ Problem Summary
  • acc : … → fails

  • $acc : … → works

  • ac : … → works

  • Documentation still uses acc : … as valid syntax

 Can you check and confirm on above issue and what should be solution .

Toshiya Kobayashi

unread,
Nov 26, 2025, 3:24:24 AM (7 days ago) Nov 26
to drools...@googlegroups.com
Thank you for reporting.

Yes, `acc` is a keyword (= abbreviation for `accumulate`). As you
mentioned, the example has to be fixed. I will work on a fix for the
documentation.

https://github.com/apache/incubator-kie-drools/issues/6534

Please use other words. `$acc` would be nice.

Regards,
Toshiya
> --
> You received this message because you are subscribed to the Google Groups "Drools Usage" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/drools-usage/9b1a9266-0491-457c-bfe6-92461a8e103fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages