Skip to content

v3.2.0

Compare
Choose a tag to compare
@fmbenhassine fmbenhassine released this 09 Apr 21:17
· 157 commits to master since this release

This is the second maintenance release of the 3.x line. It introduces a new module called easy-rules-support. This module contains support classes that were in the easy-rules-core module. For instance, the org.jeasy.rules.core.CompositeRule has been moved to easy-rules-support as org.jeasy.rules.support.CompositeRule and made abstract. 3 implementations of composite rules are now provided out of the box:

  • UnitRuleGroup: All or nothing semantics (exactly the same as CompositeRule in previous versions)
  • ActivationRuleGroup: XOR logic, ie only one rule of the group will be triggered (issue #122)
  • ConditionalRuleGroup: A primary rule acts as a precondition to trigger the rule group (issue #130)

This release comes with other new features and some bug fixes:

Features

  • Issue #96: Set priority through @Rule annotation
  • Issue #133: Read YAML rule descriptor from a String
  • Issue #138: Load multiple rules from a single yaml file

Bug fixes

  • Issue #139: NPE If a null Fact is injected through annotation
  • Issue #143: Proxy toString() is not equal to original object toString()
  • Issue #141: NPE in MVELRuleDefinitionReader if rule name, description or priority is not specified

Deprecations

  • Issue #145: Deprecate MVELRuleFactory#createRuleFrom(java.io.File). A new method that takes a java.io.Reader is to be used instead to be able to read rules not only from files (with a FileReader), but also from Strings (with a StringReader) or any other reader implementation.
  • Issue #122: org.jeasy.rules.core.CompositeRule is deprecated. It has been moved to the new easy-rules-support module and is now abstract.

I would like to thank @dagframstad, @danrivcap, @bpoussin and @paulbrejla for their contributions to this release.