From a779cb1587f67a3fedd945445f5abfbb05a1d4a3 Mon Sep 17 00:00:00 2001 From: Shiwei Tian Date: Thu, 28 Sep 2017 19:15:33 +0800 Subject: modify drools engine Issue-ID: HOLMES-44 Change-Id: I486232f783611132299a7dd95fa9de45bb69e343 Signed-off-by: Shiwei Tian --- .../src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java index b23dde0..5ccf29b 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java @@ -192,6 +192,10 @@ public class DroolsEngine { public void putRaisedIntoStream(VesAlarm raiseAlarm) { FactHandle factHandle = this.ksession.getFactHandle(raiseAlarm); if (factHandle != null) { + Object obj = this.ksession.getObject(factHandle); + if (obj != null && obj instanceof VesAlarm) { + raiseAlarm.setRootFlag(((VesAlarm) obj).getRootFlag()); + } this.ksession.retract(factHandle); } this.ksession.insert(raiseAlarm); -- cgit 1.2.3-korg