All Versions
Latest Version
Avg Release Cycle
169 days
Latest Release
1325 days ago

Changelog History
Page 1

  • v4.1.0 Changes

    December 06, 2020

    ๐Ÿš€ This version is a minor release which comes with the following new features, enhancements and bug fixes:

    ๐Ÿ†• New features

    • Issue #283: Add size method in Rules API
    • โšก๏ธ Issue #288: Update Rules#register / Rules#unregister methods to accept varargs
    • ๐Ÿ‘ Issue #271: Add support for Apache JEXL

    ๐Ÿ› Bug fixes

    • โšก๏ธ Issue #291: Update RuleProxy to accept types implementing Comparable

    ๐Ÿ“š Documentation

    • โšก๏ธ Issue #316: Update Javadoc about rule comparison
    • Issue #320: Document composite rules about their thread unsafety

    ๐Ÿš€ I would like to thank all contributors who helped making this release possible!

  • v4.0.0 Changes

    May 17, 2020

    ๐Ÿš€ This is a major release which is based on Java 8. This version comes with a number of new features and bug fixes (See detailed list below). Moreover, some breaking changes have been introduced to fix a couple of design inconsistencies in v3. Here are the major changes:

    • ๐Ÿ‘ Introducing a new Fact domain concept which replaces the Map<String, Object> data structure used in v3. This new concept has a number of advantages like type safety, better encapsulation and a cleaner API.
    • โœ… MVEL/SpEL conditions now throw runtime exceptions instead of catching them and returning false. This makes it possible to correctly unit test conditions as well as listen to evaluation errors with a rule listener (a new method RuleListener#onEvaluationError has been introduced for this purpose).
    • ๐Ÿ”ง SpEL conditions and actions should now use the #{ ... } template by default. This is configurable but it has been made the default to be consistent with Spring's default template parser.

    โฌ†๏ธ Moreover, thanks to this major Java version upgrade, a lot of improvements have been introduced in the API (like using default methods in interfaces, adding @FunctionalInterface where appropriate, etc) as well as in the code base (using lambdas and streams where it made sense, using new reflection APIs introduced in Java 8, etc).

    ๐Ÿš€ Here is the list of issues resolved in this release:

    ๐Ÿ†• New features

    • issue #276: Add Fact concept
    • issue #250: Add a clear method in Facts API
    • issue #259: Add BeanResolver to SpELAction and SpELCondition

    ๐Ÿ› Bug fixes

    • issue #267: Facts#asMap should return an immutable map or a copy of the facts
    • issue #211: MVELCondition does not re-throw exceptions
    • issue #257: Inconsistent SpEL expression templating between SpELRule and SpELRuleFactory

    โœจ Enhancements

    • ๐Ÿšš issue #268: Improve Javadoc of Facts#iterator to mention that it should not be used to remove facts
    • 0๏ธโƒฃ issue #253: Add default methods in interfaces

    ๐Ÿš€ I would like to thank all contributors who made this release possible by reporting issues, testing fixes, requesting features and participating in discussions: @readilychen, @elitacco, @snok3r, @AleksandrPalchuk, @turiandras, @Alexey1Gavrilov, @yunfengwang and @R-Gerard ! Thank you all for your contributions!

    A special BIG thank you to @zhhaojie for following up on issues, helping in design discussions and all the time and effort put on Easy Rules!

    Migration guide from v3 to v4

    ๐Ÿšš Moved APIs

    ๐Ÿ“ฆ The following APIs have been moved between packages for better cohesion:

    • ๐Ÿ“ฆ RulesEngineParameters has been moved from package org.jeasy.rules.core to org.jeasy.rules.api
    • ๐Ÿ“ฆ CompositeRule and its implementations (ActivationRuleGroup, UnitRuleGroup and ConditionalRuleGroup) have been moved from the root package to a dedicated package
    • ๐Ÿ“ฆ RuleDefinitionReader and its implementations (AbstractRuleDefinitionReader, YamlRuleDefintionReader and JsonRuleDefintionReader) have been moved from the root package to a dedicated

    Action: Update import statements where the aforementioned classes are used

    โœ‚ Removed APIs

    ๐Ÿšš For both MVEL and SpEL modules, the ParserContext is now passed to rules and rule factories at construction time. Hence, all overloaded methods where the parser context is passed as a parameter (which are now useless) have been removed:

    • ๐Ÿ“œ Methods org.jeasy.rules.mvel.MVELRule.when(String, ParserContext) and org.jeasy.rules.mvel.MVELRule.then(String, ParserContext)
    • ๐Ÿ“œ Methods org.jeasy.rules.mvel.MVELRuleFactory.createRule(Reader, ParserContext) and org.jeasy.rules.mvel.MVELRuleFactory.createRules(Reader, ParserContext)
    • ๐Ÿ“œ Methods org.jeasy.rules.spel.SpELRule.when(String, ParserContext) and org.jeasy.rules.spel.SpELRule.then(String, ParserContext)
    • ๐Ÿ“œ Methods org.jeasy.rules.spel.SpELRuleFactory.createRule(Reader, ParserContext) and org.jeasy.rules.spel.SpELRuleFactory.createRules(Reader, ParserContext)
    • ๐Ÿ“œ Methods, ParserContext) and, ParserContext) do not take a ParserContext as parameter anymore.

    Action: Pass the parser context at construction time (to the rule or the rule factory) and call new methods that do not take the parser context as parameter.

    ๐Ÿ”„ Changed APIs

    Due to the introduction of the new Fact concept (issue #276), the following method signatures have been changed:

    • Facts#put(String, Object) does not return the previous associated value if any, the return type is now void
    • ๐Ÿšš Facts#remove(String) does not return the removed fact anymore, the return type is now void
    • Facts#iterator now returns a Iterator<Fact> instead of Iterator<Map.Entry<String, Object>>


    • โšก๏ธ Update the assigned variable type where those methods are called.
    • ๐Ÿ‘€ For Facts#put, since the previously associated value if any is not returned anymore, one can query the Facts API to see if there is a fact mapped for the given name before calling put.
    • ๐Ÿšš ForFacts#remove, since the removed fact is not returned anymore, one can query the Facts API
      to get the fact before removing it.
  • v3.4.0 Changes

    December 08, 2019

    ๐Ÿš€ This is a minor release with a few enhancements and bug fixes:

    โœจ Enhancements

    • Issue #221: RuleProxy can be speed up by caching reflective access
    • Issue #238: Make AbstractRulesEngine public
    • ๐Ÿšš Issue #223: Remove DefaultRuleListener and DefaultRulesEngineListener

    ๐Ÿ› Bug fixes

    • Issue #239: RulesEngine listeners are not invoked when registered in an InferenceRulesEngine

    ๐Ÿš€ Many thanks to all contributors for their help in this release!

    ๐Ÿš€ โ—๏ธ Please note that this is the last release in the v3 line. Next version will be 4.0.0 and will be based on Java 8.

  • v3.3.0 Changes

    April 25, 2019

    ๐Ÿš€ This release is a minor version with the following changes:

    ๐Ÿ”‹ Features and enhancements

    • ๐Ÿ‘ #156: Add composite rule support from a rule descriptor file
    • 0๏ธโƒฃ #166: Change default log level to DEBUG
    • ๐Ÿ“œ #197: Add support for parser context in MVEL conditions/actions
    • ๐Ÿ‘ #202: Add support to read rules from JSON objects
    • ๐Ÿ‘ #204: Add support for Spring Expression Language

    ๐Ÿ› Bug fixes

    • #157: RulesEngine#getListeners and RulesEngine#getRulesEngineListeners should return a unmodifiable list of listeners
    • #158: RulesEngine#getParameters should return a copy of the parameters
    • #165: Incorrect rule validation for non annotated fact parameters
    • #194: MVELAction does not re-throw exceptions
    • #203: ConditionalRuleGroup has wrong priority control

    โ—๏ธ Heads-up: Even though this is a minor release, there is a small breaking change in the MVELRuleFactory API. It was not possible to introduce SpEL and JSON support without introducing this breaking change, and waiting for a major release (Java 8 baseline) did not make sense. Semantic versioning rules are not as easy to implement as Easy Rules ๐Ÿ˜„

    ๐Ÿš€ Many thanks to @Jeff-Jia, @wuhaidu, @khaledabderrahim, @ramnaresh2051, @kayeight, @amitvj1 and @mr0815mr for their contributions to this release!

  • v3.2.0 Changes

    April 09, 2018

    ๐Ÿš€ 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 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( A new method that takes a 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.

  • v3.1.0 Changes

    December 18, 2017

    ๐Ÿš€ This release is another important milestone for Easy Rules! We finally managed to get some long awaited features out ๐Ÿ˜„

    The major additions of v3.1 are:

    • ๐Ÿ†• New inference rules engine
    • ๐Ÿ†• New Condition, Action and RuleBuilder APIs
    • ๐Ÿ‘Œ Support for using expression language to define rules

    ๐Ÿš€ This release has also introduced a lot of API improvements thanks to some amazing contributors! Here is the full list of changes:

    ๐Ÿ”‹ Features:

    • issue #36: Use Expression Language to define rules
    • issue #88: Add inference rules engine
    • ๐ŸŒฒ issue #113: Use SLF4J instead of java.util.logging
    • issue #121: Add rules engine listener
    • issue #119: Add Condition / Action APIs

    ๐Ÿ› Bug fixes:

    • ๐ŸŽ issue #91: Log performance in silent mode
    • issue #100: Rule proxy's equals return unexpected result

    โœจ Enhancements

    • issue #123: cast friendly Facts
    • ๐Ÿ–จ issue #118: Use toString() to print engine parameters
    • ๐Ÿšš issue #111: Remove unnecessary method and interface
    • issue #115: Override equals()/hashCode()/toString() same as BasicRule
    • issue #104: [subFacts]: Conditions or Actions can have subclass of Facts as parameter
    • issue #95: Improve the Facts api
    • issue #94: A little optimization in

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ issue #126: Deprecate RulesEngineBuilder
    • issue #91: Methods RulesEngineParameters#setSilentMode and RulesEngineParameters#isSilentMode as well as constructors taking silentMode parameter

    I would like to thank @wg1j, @sanmibuh, @shivmitra, @cemo and @khandelwalankit for their contributions!

  • v3.0.0 Changes

    May 30, 2017

    This is a big milestone for Easy Rules since the beginning! v2.x was a successful line but we must admit it suffered from a couple of design decisions:

    1. Rules were designed to encapsulate data (BOM) they operate on. This works fine, but is not very friendly to concurrent threads
    2. The rules engine was designed to encapsulate the set of rules it operates on. For the same reason as 1) , this make the engine not thread safe

    v3 is finally here to fix these issues! Please find below the most important changes and additions.

    Important notes about v3

    Easy Rules is now part of the jeasy project. Hence, the maven's groupId has changed from org.easyrules toorg.jeasy

    ๐Ÿ“š Online documentation has been moved from to the wiki of the github project. The site will be shutdown on 31/07/2017.

    ๐Ÿšš Gitter chat room has been moved from to

    Major changes

    • issue #37 : Add working memory abstraction through the Facts API
    • issue #86 : Add rules set abstraction through the Rules API
    • issue #87 : Add @Fact annotation to inject facts in conditions and actions methods of rules

    โšก๏ธ The DefaultRulesEngine class is now public. Keys APIs (Rule, RulesEngine and RuleListener) have been updated to accept Rules and Facts in their methods signatures. Please refer to the javadoc for all details about these changes.

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ issue #79 : deprecate rules engine name parameter
    • ๐Ÿšš issue #74 : remove spring support that was deprecated in v2.5
    • ๐Ÿšš issue #75 : remove quartz support that was deprecated in v2.5

    ๐Ÿš€ This release would not have been possible without the help of some awseome contributors! We are grateful to all of them! Thank you for your time and effort.

  • v2.5.0 Changes

    May 18, 2017

    โœ… This is the latest version in v2.x line. It adds the following features and bug fixes:

    ๐Ÿ”‹ Features

    • issue #64 : Add ability to unregister a rule by name
    • issue #65 : Add Spring Boot Starter for Easy Rules
    • issue #72 : Add ability to get notified with rule evaluation result in the RuleListener API

    ๐Ÿ›  Fixed bugs

    • issue #66 : Core annotations are not inherited in child classes
    • issue #68 : @SpringRule annotation is not inherited in child classes

    ๐Ÿšš In this version, support for Spring and Quartz has been deprecated and will be removed in v3.0.

    โœ… Many thanks to @khandelwalankit, @cogito-clarus, @careerscale, @cgonul, @pklovesbacon and @yisraelU for reporting issues and testing fixes.

    A special thank to @andersonkyle for adding a spring boot starter to easy rules!
    A big thank goes to @will-gilbert for implementing easy rules tutorials with groovy!

  • v2.4.0 Changes

    February 08, 2017

    ๐Ÿš€ This is a minor release with the following changes:

    ๐Ÿ”‹ Features

    • issue #52: add skipOnFirstNonTriggeredRule parameter

    ๐Ÿ› Bug fixes

    • issue #57: incorrect sorting of rules when BasicRule.getPriority method is overridden

    โœจ Enhancements

    • issue #63: Utils class should not be public

    ๐Ÿ—„ Deprecations

    • ๐Ÿšš issue #47: JMX support has been deprecated in v2.3 and removed in this version

    Many thanks to all contributors, especially @toudidel and @spearway and @JurMarky, for reporting issues, fixing bugs and implementing features.

  • v2.3.0 Changes

    August 24, 2016

    ๐Ÿ†• New features

    • issue #34 : add method beforeEvaluate in RuleListener
    • issue #39 : add method getListeners in RulesEngine to get registered listeners
    • issue #40 : add method checkRules in RulesEngine to check rules without firing them
    • issue #41 : add possibility to create composite rules from annotated rules

    ๐Ÿ›  Fixed bugs

    • issue #32 : unable to use Easy Rules in android due to JMX
    • issue #38 : unable to set rules engine name in spring factory bean

    ๐Ÿ‘Œ Improvements

    • ๐ŸŒฒ issue #46 : improve JUL log record format

    ๐Ÿ—„ Deprecation

    • ๐Ÿ—„ issue #47 : deprecate JMX managed rules and rules engine