2
votes

Is there any way to dynamically edit the rules loaded into Drools without reloading a new DRL file?

We are trying to use Drools as a rules engine, but in our use-case, rules are added and removed quite frequently, and we'd like to avoid having to reload the whole .drl file each time this happens.

1

1 Answers

2
votes

The recommendation in the documentation is to spread your rules across multiple files: https://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html#d0e2785

...you are also able to spread your rules across multiple rule files (in that case, the extension .rule is suggested, but not required) - spreading rules across files can help with managing large numbers of rules.

Suggest you split your rules up into logical groups that change together, or one rule per file if such is more appropriate.