Skip to content

Introduction

rulii-explorer shows the rules, rule sets and rule flows of a running Spring Boot application. It reads the live rule registry, describes every artifact in plain English, draws the dependencies and the flowcharts, and points out what is likely to fail. It is read-only, and it is built for developers and for the people who own the rules.

You can see it on the demo, which shows a sample order service.

  • Overview. Counts, a map of which flows run which rule sets and rules, the problems found, and the packages.
  • A page for every rule, rule set and flow. What a rule checks, as a sentence, with the expression as written one click away; its parameters and the bindings it reads and writes; what uses it; where it is defined. A rule set lists its rules in order with their conditions. A validator shows its error code, message and settings.
  • Rule flows as flowcharts. Decisions, loops, scopes, asynchronous steps and exception handlers, drawn as a chart and listed as an outline. Clicking a step shows what it runs. Rule sets and flows say what they take and what they return.
  • A dependency graph. One artifact and its neighbours, or the whole application grouped by package or category.
  • Bindings. Which rule writes a value, which rules read it, and which of its properties.
  • Problems. A step that runs something that is not registered, a lookup by a rule’s name where its registry name was meant, duplicate names, unused rules, missing descriptions. Each one says why it matters and how to fix it.
  • Search across names, conditions, error codes and bindings.
  • Beans (opt-in). The classes the application validates with rulii-bean-validation: their constraints, @Expr expressions and @Validate rules, the rule built for each constraint, and the cascades between beans. See Configuration.

Every screen has an address that can be shared, and light and dark themes follow the operating system unless you choose.

SpEL, JavaScript and Java script expressions are read and phrased as sentences. Anything the explorer cannot phrase is shown as written.

The body of a compiled method cannot be read while the application runs. For a rule written as a Java class or a lambda, the explorer shows what rulii knows for certain (its name, description, signature and parameters) and says that its logic is compiled. It does not guess. To have the logic shown, define the rule in XML with a script expression.

A configuration placeholder such as ${order.minTotal:100} is shown as written, with its default. The value the application resolved is not shown unless you ask for it.

People who own rules find them by what they are for, not by the package they were written in. Every rule, rule set and flow can declare one category (hierarchical, with /) and any number of tags, and the explorer organises itself around them: the sidebar becomes the category tree, the overview and the graph group by category, and tags are chips that search (tag:vip, in:Pricing).

@Rule("ConsistentDatesRule")
@Category("Orders/Validation")
@Tags({"orders", "dates"})
public class ConsistentDatesRule { ... }
<r:defaults category="Pricing" tags="pricing"/>
<r:rule name="VipDiscountRule" tags="vip" description="...">...</r:rule>

Nothing is inferred. Without categories the sidebar groups rules by the rule set that runs them.

The explorer is three libraries. An application adds the starter and gets the other two.

Artifact What it is
rulii-explorer-spring-boot-starter Auto-configuration, the Actuator endpoint and the page. The one dependency to add.
rulii-explorer-core The descriptor: the model of an application’s rules, and the checks that find problems.
rulii-explorer-ui The page itself, as static files.

The application serves a JSON document, the descriptor, at /actuator/rulii, and the page at /rulii reads it. Nothing is built when the application starts: the descriptor is created on the first request and kept until the application context refreshes.

Next: Installation.