j-easy / easy-rules

The simple, stupid rules engine for Java
https://github.com/j-easy/easy-rules/wiki
MIT License
4.86k stars 1.05k forks source link

WHY existing engines are not extendable? What about Open-closed Principle in SOLID? #361

Open dani-e-l opened 3 years ago

dani-e-l commented 3 years ago

Hello

what is the reason that you don't allow to extend DefaultRule AbstractRulesEngine DefaultRulesEngine

We would like to implement feature that will allow to return specific result when

public Facts execute(Facts facts) throws Exception

will be executed.

Because of that, this code is not extendable. We have to copy paste whole code from AbstractRulesEngine, DefaultRulesEngine.

zhhaojie commented 2 years ago

https://github.com/j-easy/easy-rules/pull/62

It had been discussed here , hope useful for u