Tutorial Course
Ten short lessons, from your first rule to a loan-approval engine in a ColdBox app.
On this page
Tutorial Course
Learn RuleBox by building one small thing: a loan decision. A customer
applies with a credit score and an amount. Your rules decide
DECLINED, APPROVED, or MANUAL_REVIEW.
Each lesson takes about five minutes and ends with a Try it step. By the end you will have:
- written rules in BoxLang with the
given / when / thenDSL - read back results and see exactly which rules ran
- moved the rules into a JSON file the business can edit
- used them from a ColdBox handler
- watched them run in the Rule Visualizer
Before you start
- You can read and write BoxLang, and you have a ColdBox 8 app.
- You do not need to know anything about rules engines.
The lessons
- What is RuleBox?The idea in one minute, what we will build, and how to install it.
- Your First RuleWrite a RuleBook with one rule, run it, and read the answer.
- Facts and ResultsGive rules their data, and read back what they decided.
- More RulesAdd an approval rule, and control order and exceptions with priority, stop and except.
- See What HappenedRead the audit trail, preview a run with dryRun(), and check metrics.
- Rules from JSONKeep your thresholds in a file the business can edit, without a code change.
- RuleBooks in ColdBoxDeclare a rulebook once in config, then get a fresh copy anywhere in your app.
- When Things Go WrongWhat RuleBox does when a rule throws, and the mistakes it catches early.
- The VisualizerTurn on the built-in admin UI to browse rules, dry-run them, and watch them live.
- Where to Go NextA recap of what you built, a few habits worth keeping, and where to read more.
Your progress is saved in your browser, so you can stop and come back to the lesson where you left off.