RuleBox is a modern, intuitive, natural-language rules engine for BoxLang and ColdBox applications.
Tired of classes filled with if/then/else statements? Need a nice
abstraction that decouples rules from each other and lets you write them the same way you write the rest of your BoxLang? RuleBox is right for
you. Rules are written in an expressive, dynamic Domain Specific Language
modeled closely after the
Given-When-Then
methodology.
- Natural-language rules engine for BoxLang and ColdBox applications.
- Decouples rules from each other for better maintainability.
- Expressive, dynamic Domain Specific Language (DSL) modeled after Given-When-Then.
- Visualizer dashboard for dry-run, metrics, and live tracking.
- Supports external rules from JSON, YAML, or a database.
- Declared facts: a RuleBook can list the facts it takes, with types, defaults and descriptions, and optionally enforce them.
- Thread-safe and robust error handling.
Full documentation, guides, and the complete DSL reference at: https://rulebox.coldbox.org
The site covers everything: getting started, defining RuleBooks, the
given/when/except/then/using/stop DSL, facts and results, the
Builder, rule auditing, thread safety, error handling, and a full
worked example - versioned, so the 1.0.0 docs stay right where they were.
- Tutorial Course: a step-by-step course from your first rule to the Visualizer.
- Declaring Facts: document the facts a RuleBook takes, and enforce them if you want.
- External Rules: load rules from JSON, YAML, or a database.
- Visualizer: a dashboard, dry-run playground, metrics, and a live tracker.
- BoxLang 1.18+
- ColdBox 8+
- CommandBox 7.x (
bx-climodule for BoxLang)
In your ColdBox application run this within the CommandBox shell:
box install ruleboxOptionally, if you will be using YAML rules or our SQL metrics store:
- YAML rule files:
box install bx-yaml - Visualizer metrics that survive a restart (
SQLiteMetricsStore):box install bx-sqlite, plus a datasource
box install bx-yaml, bx-sqliteOr open your server.json and add them in the installScripts section:
"scripts":{
"onServerInitialInstall":"install bx-esapi,bx-yaml,bx-sqlite --noSave"
}Apache License, Version 2.0.
See CONTRIBUTING.md.
Made with ❤️ by Ortus Solutions, Corp.
