The reason why rule engines are extremely useful is that they allow us to express declaratively what to do in specific scenarios. In contrast to imperative languages such as Java, the Rule Engine provides a declarative language that is used to evaluate the available information.
In this chapter we will analyze some Drools rules, but this chapter will not explain in detail the Drools Rule syntax. For more information on this take a look at the official documentation at http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/.
Let's analyze the following simple example to understand the differences between the declarative approaches and the imperative approaches:
rule "over 18 enabled to drive" when $p: ...