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

Ability to aggregate over joined facts #104

Open
snikolayev opened this issue Apr 5, 2017 · 1 comment
Open

Ability to aggregate over joined facts #104

snikolayev opened this issue Apr 5, 2017 · 1 comment
Assignees

Comments

@snikolayev
Copy link
Member

Rule engine is currently capable of joining facts (i.e. matching facts correlated via a join condition) as well as aggregating facts on the fly (i.e. collecting matching facts into a collection).
What's currently very hard to do is to join facts and then aggregate over those joined fact.
I.e., in pseudo code:
Match a
Match b (joined to a)
Collect all matched (a,b) tuples as IEnumerable

@snikolayev snikolayev added this to the 0.9.0 milestone Feb 21, 2018
@snikolayev snikolayev self-assigned this Jun 11, 2018
snikolayev added a commit that referenced this issue Jun 11, 2018
snikolayev added a commit that referenced this issue Jun 11, 2018
@DonaldAirey
Copy link

Yes, this is very important to a state-driven rules engine. Ideally, you would want a single alert to be generated when a violation of a given rules occurs, and you would want that same alert to be cleared when the condition goes away. In order to do this, each rule evaluation must be associated with a single .Do action (and a unique key so we have a way of clearing the violation when the .Undo action is triggered). Aggregates (GroupBy) rules invoke a different .Do for every condition in the IGrouping so it's impossible to know when a condition has been cleared (because they are ambiguous without a unique key). Being able to roll the facts back up to a single rule violation is critical.

@snikolayev snikolayev removed this from the 0.9.0 milestone May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants