From a35ca0b16ffa99119b5d16cd005f91ff734c8df8 Mon Sep 17 00:00:00 2001 From: Joshua Reich Date: Tue, 14 Aug 2018 15:04:03 -0700 Subject: Add code to store abatement events. Stores abatement events in history DB. Change-Id: Ifca6acd42cd9eea85e27765bd268a491028e305a Issue-ID: POLICY-975 Signed-off-by: Joshua Reich --- .../src/main/resources/__closedLoopControlName__.drl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'controlloop/templates/archetype-cl-amsterdam') diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index 71715c075..b210c79d6 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -340,6 +340,10 @@ rule "${policyName}.EVENT.MANAGER" logger.info("{}: {}: abatement received for {}. Closing the control loop", $params.getClosedLoopControlName(), drools.getRule().getName(), $event.getRequestId()); + + /// DB Write---end event processing for this RequestId() + $manager.commitAbatement("Event Abated","Closed"); + notification.setFrom("policy"); notification.setPolicyName(drools.getRule().getName()); notification.setPolicyScope("${policyScope}"); -- cgit 1.2.3-korg