CacheControl / CacheControl/json-rules-engine
Possible to use a rule as a fact in another rule?
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
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_?
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files, tests, or entry points. Start by locating the rule and fact evaluation paths, then clarify how a rule referenced as a fact should be evaluated; done means Rule 2 can reuse Rule 1 without duplicating Field A and existing behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100