j-easy / easy-rules

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

Is the Rules example by setting the result in the Rule class itself correct? #392

Closed thomas2977 closed 1 year ago

thomas2977 commented 1 year ago

Referring to FAQ's https://github.com/j-easy/easy-rules/wiki/faqs "2. I would like to return a value upon a rule execution, how to do that?"

If rules are stateless, how can we set the execution result in the Rule itself?

thomas2977 commented 1 year ago

Any updates? @fmbenhassine

dvgaba commented 1 year ago

You can update objects which are part of facts, see example

thomas2977 commented 1 year ago

Thanks @dvgaba