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

Rule evaluation seems to be non-deterministic #8

Open
juannorris opened this issue Nov 6, 2024 · 1 comment
Open

Rule evaluation seems to be non-deterministic #8

juannorris opened this issue Nov 6, 2024 · 1 comment

Comments

@juannorris
Copy link
Contributor

juannorris commented Nov 6, 2024

Description of the issue

While testing the library, I noticed a behavior that seems to be non-deterministic around rules evaluation.

For the same set of rules and facts, having priorities and OnSuccess define for each rule, where the on success callback calls engine.Stop() , subsequent runs would evaluate all rules some times and only the rules up until where engine.Stop() was called other times.

I also notices another issue, which is perhaps related. When giving the engine a single rule with OnSuccess/OnFailure callbacks defined, these don't get to be executed before the engine finishes running, even though the outcome from the evaluation is the expected one. If I add a second rule with less priority than the aforementioned rule, then it works as expected.

I'll provide concrete examples as soon as I can, but creating the issue now so I don't forget about it.

@d-sooter
Copy link
Collaborator

Thanks ill try to take a look at it over the next few days.

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

No branches or pull requests

2 participants