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

All the custom rules are not being registered in easy-rules library. #350

Open naman99lalit opened 3 years ago

naman99lalit commented 3 years ago

I am using Rules rules = new Rules() to create new Rules and for registering, I am using: rules.register(new CustomRule(arg1))

My rules that I have created are all extending BasicRule because I had to pass arguments and use them in the rules. I have 4 rules which are being registered in this way.

But the problem is, while firing the rules with the help of RulesEngine, only the 1st registered rule is being executed. I am not able to fire all these rules.

And also, while debugging I saw that only the 1st rule out of the 4 registered rules, is being registered. But, I want to fire all the rules, which is not happening.

Please can anyone help, if they have faced a similar problem in the easy-rules library? I am using the POJO method for building the custom rules.

daidai21 commented 3 years ago

can you show your code?

ankeetmaini commented 3 years ago

you're probably not passing the name of the rule and hence this is a problem.