Drools 6.0 dynamically load rules at runtime

后端 未结 3 566

I want to load a drl file at runtime. The posts I\'ve found including this one work for version 5.0 but I can\'t figure out how to do it for drools version 6.0.

3条回答
  •  暖寄归人
    2020-12-30 18:03

    In Drools 6, your rules packages are deployed to Maven. A KieScanner is provided, which you can attach to your KieContainer. This polls your repository at a defined interval to see whether a package has been updated and downloads the latest if that's the case.

    A full explanation of how to define a KieScanner (including code samples) is provided in the Drools documentation here:

    https://docs.jboss.org/drools/release/latest/drools-docs/html/ch04.html

提交回复
热议问题