unruly-engine 2.35.3 API
A rules engine for Java: rules are conditions and actions written in an expression language, such as MVEL, that an engine compiles once and runs against your facts from any number of threads.
Where to start
RulesEngineBuilderbuilds an engine: choose the match policy (firstMatch,allMatchesoruniqueMatch), then its languages, imports, listeners and limits.Ruleis a condition, an action and a priority, created withRule.builder().RulesEngine.load(java.util.List)compiles a rule list; a broken rule fails there, not during a run.RulesEngine.run(io.github.brantunger.unruly.api.FactStore)runs the rules against aFactStore, such as aFactMap.RuleListenerobserves each run, condition and action; whatloadandrunthrow is inio.github.brantunger.unruly.api.exception.- Writing an expression language starts at
io.github.brantunger.unruly.api.language, and testing one atio.github.brantunger.unruly.test.
Modules
io.github.brantunger.unruly.core, the artifactunruly-engine-core: the API, the language SPI and the engine, without an expression language.io.github.brantunger.unruly, the artifactunruly-engine: the MVEL language. It requires the core module.io.github.brantunger.unruly.test, the artifactunruly-engine-test: tools for testing an expression language, for its own tests.
The guides: the quick start and the documentation index, which lists a reading order for each kind of reader.
Modules
Module
Description
The Unruly rules engine with the MVEL expression language.
The Unruly rules engine without an expression language.
Tools for testing an expression language: a contract test that any language's tests extend, and the contexts the
engine passes to a language, for unit tests of its compiler and compiled expressions.