What problem does it solve?
Encapsulates complex conditional logic and policy evaluation outside of handlers and services so that eligibility, pricing, authorization, and workflow branching can be expressed as reusable, testable rules instead of sprawling if/elseif trees.
Core Features & Use Cases
- RuleEngine injection for seamless dependency access in ColdBox/BoxLang components.
- Define rules with when/then/otherwise closures, compose named rule sets, chain rules, and run sets against a mutable context struct.
- Production patterns such as loan eligibility evaluation, pricing adjustments, policy enforcement, and workflow branching that remain deterministic and testable.
- Testability: call .run(context) directly from TestBox specs and keep side effects out of rule closures.
Quick Start
Run a named rule set like loan_eligibility against an applicant struct to return approved and reasons fields.