Support for annotations with key/values

21 views
Skip to first unread message

Michał Górniewski

unread,
May 21, 2024, 4:36:08 PMMay 21
to Drools Usage
Hi,

Is there any reason why annotations doesn't support key/value pairs. DRL compiler supports them, but ModelGenerator will throw exception. I think about rules like this:

rule "Annotated"
   @Test(abc=xyz,foo=bar)
when
   eval ( true )
then
   //
end

It seems that this would be simple change in ModelGenerator: https://github.com/mgorniew/drools/commit/3c332020f71ab2a182681735cf1a29233ad4e5a4

Thanks,
Michał

Toshiya Kobayashi

unread,
May 23, 2024, 2:48:21 AMMay 23
to Drools Usage
Thanks, Michal!

Your fix looks good (just please avoid * in import ). Could you please file a PR with a unit test to https://github.com/apache/incubator-kie-drools/ ?

Thanks!
Toshiya

2024年5月22日水曜日 5:36:08 UTC+9 michal.g...@gmail.com:
Reply all
Reply to author
Forward
0 new messages