A Complete Tutorial on the Drools Business Rule Engine

Business rules work very well to represent the logic for certain domains. They work well because they result intuitive and close to the way of thinking of many types of domain experts. The reason for that it is that they permit to decompose a large problem in single components. In this way, the user does not deal with the orchestration of all the single rules: this is the added value provided by the business rule engine.

In this article, we will discuss one specific example of an application written by using business rules. We will write the rules to decide, which email to send to the subscribers to a newsletter. We will see different types of rules and how we could express them using the Drools Rule Language. We will also see how to configure Drools (spoiler: it will be easy) and have the system elaborate on the rules to produce a result we can use.