From 7de1a5823a5f48d6d88373ee96f573a7ab3ebe33 Mon Sep 17 00:00:00 2001 From: Cory Jones Date: Thu, 13 Jul 2023 11:01:50 -0400 Subject: [PATCH] Closes #385: Call EvaluateRuleEntry listeners when rules evaluated in FindMatchingRules --- engine/GruleEngine.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/GruleEngine.go b/engine/GruleEngine.go index 9e41970a..c5b5b3c2 100755 --- a/engine/GruleEngine.go +++ b/engine/GruleEngine.go @@ -259,6 +259,8 @@ func (g *GruleEngine) FetchMatchingRules(dataCtx ast.IDataContext, knowledge *as if can { runnable = append(runnable, v) } + // notify all listeners that a rule's when scope has been evaluated. + g.notifyEvaluateRuleEntry(cycle+1, v, can) } } log.Debugf("Matching rules length %d.", len(runnable))