json-rules-engine icon indicating copy to clipboard operation
json-rules-engine copied to clipboard

Ability to specify different events for failure and success

Open carapai opened this issue 4 years ago • 1 comments

How can I return different event params depending on whether the rule succeeds or not? Thanks

carapai avatar Oct 24 '21 06:10 carapai

This https://github.com/CacheControl/json-rules-engine/blob/master/examples/09-rule-results.js?

Sadly, the logic is not entirely encodable in JSON, you have to rely on the on('failure',....) mechanism of the engine.

akmjenkins avatar Oct 29 '21 17:10 akmjenkins