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

How to identify which part has failed in the rule condition? #355

Open SudharsanThumattiSathiamoorthy opened 3 years ago

SudharsanThumattiSathiamoorthy commented 3 years ago

Hi Team,

Is there any way to know which part has failed in the rule condition using easy-rules-engine? In the below rule condition, we need to know if "product.width >= 50.5" or "product.height > 2" has failed? I have went through the existing functionalities provided by MVEL and I don't see the option of retrieving the sub condition which has failed.

If the existing MVEL library does not provide such functionality, Can we please take this a new requirement into j-easy project?

(product.width >= 50.5 && product.height > 2)

dvgaba commented 2 years ago

You can add system.out.println within mvel expression, or a static logger class should also work.