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

Possible to use a rule as a fact in another rule? #305

Open
robross0606 opened this issue Jul 29, 2022 · 1 comment
Open

Possible to use a rule as a fact in another rule? #305

robross0606 opened this issue Jul 29, 2022 · 1 comment

Comments

@robross0606
Copy link

robross0606 commented Jul 29, 2022

We're working on better decomposing our facts and rules, and have found that (due to our data model hierarchy), we're having to re-stipulate the same facts in multiple rules. Is it possible to use a rule as a fact in another rule so we can avoid having to copy/paste fact statements into multiple rules which is tedious and error prone?

For example, if Rule 1 states that FieldA must be true, and Rule 2 states that Field A must be true and Field B must be false, is it possible to construct Rule 2 such that Rule 1 must be true and Field B must be false?

@robross0606
Copy link
Author

robross0606 commented Aug 5, 2022

I was able to solve this by directly exposing conditions and reusing them across multiple rules so I have a viable workaround for decomposition and reuse if there's no cleaner way with the library to do it.

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

1 participant