j-easy / easy-rules

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

SpEL rule cannot handle 2 facts in the same rule #323

Closed guidoipsy closed 3 years ago

guidoipsy commented 3 years ago

Hello, I cannot make this rule work, I don't know if I making something wrong.

_.when(" #{ ['userTraitService_lifecycle'].?[ id == ['currentCycleGBP'].id ].size() > 0 }")

If I remove the ['currentCycle_GBP'].id and hardcode it with a valid id, it work, also ['currentCycle_GBP'].id is used in another rule with out problems.

But the general idea is:

fmbenhassine commented 3 years ago

This seems like a SpEL syntax issue. Please provide a minimal example that reproduces the issue or a failing unit test to be able to help you.