Breaking the Rules 2: to OR or not to OR
This is the second article (see the first here) of an occasional series, “Breaking the Rules”, in which we look at the sacred rules governing business rule design and examine some exceptional circumstances under which they can and should be broken. In this article we investigate the prohibition on the Boolean ‘OR’ operator in rule conditions.
It is a widely known rule of thumb that business rules should be atomic and that they should eschew the use of the Boolean OR operator between conditions. Only rules with single conditions, or multiple conditions that are ANDed together are recommended. In this article we consider the case for this prohibition, before explaining why, in some cases, an OR is not only acceptable, but advised… (more…)