The Drools rule engine
Drools is a rule engine framework that provides the possibility of creating rules in a script language called Drools Rule Language (DRL) and running the rules inside an in-memory inference engine that provides great performance. Rule languages have a declarative nature, which means that the next action to be taken is determined by the input data that triggers specific conditions in the rules, unlike the imperative nature of languages such as Java, where the next action to be taken is determined by the sequence of actions written in the code.
Rules written in DRL follow a very specific syntax for constraints and a configurable syntax for the actions of the rule (which we will keep as plain Java for simplicity). The constraint part of the rule shouldn't be interpreted as regular imperative code such as a Java code, where we specifically tell the system what to do at a particular point in time. Instead, it should be considered as a declarative statement, similar to a...