문제

I am new to rule engines and my application requires to load rules from xml files dynamically from the file system, because the admin can create rules during the run-time.(in Java)

My question is : Is it possible to do so in drools? If Yes, then please share the knowledge and if no, then any alternatives?

도움이 되었습니까?

해결책

As I mentioned in my comment the answer is yes. The whole point of a rules system like Drools is that it allows you to take what is traditionally hard coded branching/conditional logic and capture it externally (not code) so that it can be easily changed on the fly.

With Drools, a very simple approach could be to store the rules files external to your jar/war/ear and put a file watcher in them to reload them if they are updated. This is very basic but would work. For a more advanced approach, I believe Drools supports a versioning and deployment concept (via Guvnor) that allows you to maintain and hot deploy multiple versions of your business rules; sort of the approach I described on steroids.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top