CacheControl / CacheControl/json-rules-engine

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

未关闭
#305 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
3.1k
派生
507
PR 合并指标
30 天内没有已合并 PR

描述

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_?

贡献指南

这个仓库没有索引到贡献指南

调研方向

该 issue 没有指定文件、测试或入口点。首先定位规则和事实的评估路径,然后明确应如何评估作为事实引用的规则;完成的标准是 Rule 2 可以复用 Rule 1 而无需重复 Field A,并且现有行为仍受到覆盖。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。