The first thing we need to define in a clear manner before proceeding is what rules are. A rule, from the rule engine's perspective, is a constraint within a particular domain that will evaluate to true or false. When specific components within the domain evaluate the constraint of a specific rule to be true, we say that the particular rule is activated. When activated rules are fired (an operation that is usually separated from the activation of a rule), a particular action—specified within the rule—will be taken. Depending on the syntax, a rule structure can vary from implementation to implementation. However, the general structure of a rule will always be similar to the following code:
rule "rule name" /* optional rule attributes */ when /* a specific set of constraints in our domain */ then /* a specific set of actions to be taken when the constraints evaluate to true */ end
A single rule by itself doesn't provide much value to describe a complex decision...