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

Add RulesEvaluator API #42

Closed
fmbenhassine opened this issue Jun 3, 2016 · 6 comments
Closed

Add RulesEvaluator API #42

fmbenhassine opened this issue Jun 3, 2016 · 6 comments
Assignees
Labels
Milestone

Comments

@fmbenhassine
Copy link
Member

As discussed in #40 with @thecederick , it may be useful to have a rules evaluator API to be able check rules like: (RuleA and RuleB) or RuleC

You can already do this: ( ruleA.evaluate() && ruleB.evaluate() ) || ruleC.evaluate() . Do you believe Easy Rules should provide a RuleEvaluator API?

It is not always possible do it like you described, for example @condition annotation and you do it outside of Engine.

@fmbenhassine fmbenhassine added this to the 2.3 milestone Jun 3, 2016
@fmbenhassine fmbenhassine self-assigned this Jun 3, 2016
@pdincau
Copy link

pdincau commented Aug 12, 2016

@benas it would be cool to be able to evaluate a set of rules and get back a list containing a rule result where you can see at least which rule evaluation failed...what do you think?

@fmbenhassine
Copy link
Member Author

Hi @pdincau

Have you seen the checkRules method ?

I think this method is what you are looking for.

Kind regards
Mahmoud

@pdincau
Copy link

pdincau commented Aug 14, 2016

thanks @benas !

@fmbenhassine
Copy link
Member Author

@pdincau FYI, you can try the checkRules method with version 2.3.0-SNAPSHOT which is not released yet. I'm preparing to release it soon.

@fmbenhassine fmbenhassine modified the milestones: 3.0, 2.3 Aug 17, 2016
@pdincau
Copy link

pdincau commented Aug 17, 2016

@benas Yeah I was using previous tagged version and therefore i couldn't find the method neither on code nor in the docs. Thank you for your help 👍

@fmbenhassine
Copy link
Member Author

Sorry about that, I should have gave you this detail in my first comment. You can add this repository and use the snapshot version.

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

2 participants