Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the listener to receive events when a rule evaluates to false #72

Closed
pklovesbacon opened this issue May 7, 2017 · 11 comments
Closed
Assignees
Labels
Milestone

Comments

@pklovesbacon
Copy link

I would like to be notified via the listener interface when a rule evaluates to false. Thanks

@yisraelU
Copy link

yisraelU commented May 9, 2017

I'd also like to request this feature

@fmbenhassine
Copy link
Member

Hi,

Good Idea! Thank you for this suggestion.

I've added a method void afterEvaluate(Rule rule, boolean evaluationResult) in the RuleListener API to get notified with the evaluation result of each rule.

This method will be invoked in both cases, so you can just grab the result you need to get notified on. You can already give a try with version 2.5.0-SNAPSHOT.

Looking forward for your feedback.

Kr
Mahmoud

@fmbenhassine fmbenhassine self-assigned this May 9, 2017
@fmbenhassine fmbenhassine added this to the v2.5 milestone May 9, 2017
@yisraelU
Copy link

where do i find 2.5.0 ?

@fmbenhassine
Copy link
Member

v2.5.0 is not released yet.

You can try the new feature with version 2.5.0-SNAPSHOT that can be found in sonatype's repository. See here

@yisraelU
Copy link

would it be bad practice to use the listener to provide actions for the false side to the rule?

@fmbenhassine
Copy link
Member

Not a bad practice but it's not how it is designed to be used.

Easy rules is a production system (no else statement), so I guess you can create a rule for "else" and you are done.

Did you manage to use the snapshot version and test the new listener method?

@yisraelU
Copy link

yisraelU commented May 12, 2017 via email

@fmbenhassine
Copy link
Member

@pklovesbacon Have you got a chance to test the feature you requested?

@pklovesbacon
Copy link
Author

Hi Benas, Thanks for responding to this request. I really appreciate you adding this feature.
I'm currently tied up on another project but should be able to get back you on this in a few days time.

@pklovesbacon
Copy link
Author

I got a chance to run it up in my test environment this morning.
Yes, it suits my need perfectly.
Thanks again , Paul.

@fmbenhassine
Copy link
Member

Great! Thank you for your time.

I'll include the fix in the upcoming release, keep tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants