There are certain scenarios where it is useful to dynamically test whether an object satisfies a condition or set of conditions.
For example, a category may not explicitly declare the products it contains, and instead simply define a rule for membership. Any product for which the rule evaluates to "true" is considered a member. To support such a use-case, there needs to be a mechanism by which a rule can be defined and evaluated against objects.
For this purpose, Broadleaf offers a Rules Engine library with extensible mechanisms for parsing and evaluating rules. By default, the configuration is based upon Spring Expression Language (SpEL) expressions that provide great flexibility and power for evaluation.