From: Temoc Rodriguez Date: Thu, 2 Nov 2017 18:12:39 +0000 (-0700) Subject: Write to DB on guard deny X-Git-Tag: v1.1.0~3^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=df6ed833185ecdc20d6faf71c55160fd8638f3c3;p=policy%2Fdrools-applications.git Write to DB on guard deny When an operations was denied by guard, it was not writing to the DB at all. Only in the deny case we start the operation, then setOperationHasGuardDeny, then finish the operation. Had to add start operation just before finishing it. This allows the write to occur at setOperationHasGuardDeny. Issue-ID: POLICY-345 Change-Id: I665b9cfaa684493e39e731102d4d43ecb39fad7c Signed-off-by: Temoc Rodriguez --- 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 acc980686..fbc46a3ee 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 @@ -726,6 +726,7 @@ rule "${policyName}.GUARD.RESPONSE" } else { //This is the Deny case + $operation.startOperation($event); $operation.setOperationHasGuardDeny(); retract($opTimer); retract($operation);