The most frequently asked questions regarding Rules Engines are:
We will attempt to address these questions below.
Declarative Programming
Rule engines allow you to say "What to do" not "How to do it".
Using rules can make it very easy to express solutions to difficult problems and consequently have those solutions verified. Declarative rules are much easier to read then imperative code.
Rule systems are not only capable of solving very hard problems but also providing an explanation of how the solution was arrived at and why each decision along the way was made. This is not easy with other AI systems like neural networks.
Logic and Data Separation
Your data is in your domain objects, the logic is in the rules. This is a fundamental break from the object-orientated coupling of data and logic, which can be an advantage or a disadvantage depending on your point of view. The advantage is that the logic can be much easier to maintain when there are changes in the future, because it is all laid out in rules. This can be especially true if the logic is cross-domain or multi-domain logic. Instead of the logic being spread across many domain objects or controllers, it can all be organized in one or more very distinct rules files.
Speed and Scalability
The Rete algorithm and its descendants such as Drools' ReteOO provide very efficient ways of matching rule patterns to your domain object data. These are especially efficient when you have datasets that do not change entirely as the rule engine can remember past matches. These algorithms are battle proven.
Centralization of Knowledge
By using rules, you create a repository of knowledge which is executable. This means it's a single point of truth, for business policy for instance. Ideally rules are so readable that they can also serve as documentation.
Tool Integration
Tools such as Eclipse (and in future, Web based UIs) provide ways to edit and manage rules and get immediate feedback, validation and content assistance. Auditing and debugging tools are also available.
Explanation Facility
Rule systems can provide an "explanation facility" by logging the decisions made by the rule engine along with why the decisions were made.
Understandable Rules
By creating object models, and optionally Domain Specific Languages, that model your problem domain well you can write rules that look very close to natural language. These rules can be very understandable to non-technical domain experts.