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 / then DSL
  • 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

  1. What is RuleBox?The idea in one minute, what we will build, and how to install it.
  2. Your First RuleWrite a RuleBook with one rule, run it, and read the answer.
  3. Facts and ResultsGive rules their data, and read back what they decided.
  4. More RulesAdd an approval rule, and control order and exceptions with priority, stop and except.
  5. See What HappenedRead the audit trail, preview a run with dryRun(), and check metrics.
  6. Rules from JSONKeep your thresholds in a file the business can edit, without a code change.
  7. RuleBooks in ColdBoxDeclare a rulebook once in config, then get a fresh copy anywhere in your app.
  8. When Things Go WrongWhat RuleBox does when a rule throws, and the mistakes it catches early.
  9. The VisualizerTurn on the built-in admin UI to browse rules, dry-run them, and watch them live.
  10. 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.

Edit this page Download Markdown Last updated Oct 7, 2026, 10:59:26 AM