Reactor: fix wrong match on reactivation in propagation rule
A propagaition rule must ignore reactivated occurrence. Although it is possible that other occurrences are waiting, and they can be erroneously selected if precautions are not taken.
This commit is contained in:
parent
5e4dfb249e
commit
16e0fdf9dd
|
|
@ -423,7 +423,13 @@ internal class ReteRuleMatcherImpl(private var ruleLookup: RuleLookup?,
|
|||
val reactivated = layers.any { it.containsOccurrence(occurrence) }
|
||||
|
||||
// propagation history
|
||||
if (propagation && reactivated) return nextGeneration().reset()
|
||||
if (propagation && reactivated) {
|
||||
// TODO: need a better way to process occurrences that are activated but ignored
|
||||
// TODO: introduce a flag on ReteNode?
|
||||
// TODO: same concerns "unique signatures" and "consumed signatures"
|
||||
lastIntroduced = occurrence
|
||||
return nextGeneration().reset()
|
||||
}
|
||||
|
||||
var firstAffected = -1
|
||||
for ((idx, layer) in layers.withIndex()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue