Rule Cascade
Learn

Learn Rule Cascade

A short lesson for every feature of the rule language, then your language and the whole process. Every example runs in your browser.

This course teaches Rule Cascade one feature at a time. Each lesson is short. It says what the feature is, shows the syntax, runs one small example and ends with an exercise.

How a lesson works

  1. Read the explanation and the syntax.
  2. Look at the example: a complete ruleset, a request, and the result. The result on the page is what the engine answered when this site was built. Nobody typed it in.
  3. Try it Yourself opens the same ruleset and request in the playground. Change something and evaluate again.
  4. Do the exercise. Use the hint if you are stuck. "Show answer" reveals a solution you can also open in the playground.

Every example and every answer is a real ruleset with golden tests. The site build runs each one through the TypeScript engine, and fails if any answer differs from what its tests expect.

Where to start

New to Rule Cascade? Start with Your first rule in 2 minutes, then follow the Next links at the bottom of each page. They lead through the whole course.

Already writing rules? Jump to a group below. When you are ready to run rules in an application, go to Use it in your language and The process, end to end.

Lessons

Your progress: 0 of 64 lessons done

Saved in this browser only.

Introduction0/2

  1. Your first rule in 2 minutes
  2. How a ruleset works

Rule basics0/6

  1. The four rule kinds
  2. Targets
  3. Operations and when
  4. Priority, order and enabled
  5. Rules for every item of a list
  6. Expressions

Operators0/8

  1. Comparison operators
  2. Logic operators
  3. Arithmetic operators
  4. String operators
  5. List operators
  6. Date operators
  7. Pattern matching
  8. Null and type operators

Severities and resolutions0/3

  1. Severities and blocking
  2. Acknowledge a warning
  3. Accept the risk

Values and types0/6

  1. Values, null and no coercion
  2. Decimal numbers
  3. Strings and Unicode
  4. Dates and times
  5. Lists
  6. Semantic types

Levels and inheritance0/6

  1. Scope and levels
  2. Extends
  3. Params and override policies
  4. Override a rule
  5. Functions
  6. Custom operators

Effects0/3

  1. Computed values
  2. Field states
  3. Commands

Channels and enforcement0/2

  1. Client and server
  2. Triggers and views

Messages0/2

  1. Messages and placeholders
  2. Locales and fallback

Testing0/3

  1. Golden tests
  2. Load-time checks
  3. Bundles, manifests and checksums

Safety0/3

  1. Portable patterns
  2. Limits
  3. Fail closed

Use it in your language0/8

  1. Use it in your language
  2. Install
  3. Load a bundle
  4. Evaluate a request
  5. Handle errors
  6. Enforce
  7. Custom operators
  8. Caching and refresh

The process, end to end0/12

  1. The process, end to end
  2. Author a rule
  3. Write golden tests
  4. Check: lint and load checks
  5. Review in a pull request and CI gates
  6. Compile to a checksummed bundle
  7. Publish and version
  8. Load in applications
  9. Enforce in the UI and the API
  10. Roll out and roll back
  11. Monitor
  12. Change a rule safely across levels

On this page