Home
RuleBox is a modern, intuitive, natural-language rules engine for BoxLang and ColdBox applications.
RuleBox
RuleBox is a modern, intuitive, natural-language rules engine for BoxLang and ColdBox applications, based on the great work of RuleBook - ported over to BoxLang.
Tired of classes filled with if/then/else statements? Need a nice
abstraction that decouples rules from each other and from the rest of your
code? Want to write rules the same way you write the rest of your BoxLang?
RuleBox is right for you.
RuleBox lets you write rules in an expressive, dynamic Domain Specific Language (DSL) modeled closely after the Given-When-Then methodology popularized by Behavior Driven Development.
Rules read like sentences: given().when().then(). No nested
conditionals, no scattered business logic.
Rule@rulebox, RuleBook@rulebox, Builder@rulebox and Result@rulebox
are registered automatically - just getInstance() them.
Every rule's execution is tracked in a RuleStatusMap, so you always know
which rules fired, skipped, stopped, or failed.
Where to start
- Getting Started - install the module
- Defining RuleBooks - your first rules
- The RuleBook DSL -
given/when/except/then/using/stop - A Complex Example - a full, real-world walkthrough
Requirements
- BoxLang 1.14+
License
Apache License 2.0.