aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
index 6e57b5ef0..89b702d63 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
@@ -44,6 +44,7 @@ import org.onap.policy.controlloop.actor.vfc.VFCActorServiceProvider;
import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.controlloop.actor.so.SOActorServiceProvider;
+import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.so.SOResponse;
import org.onap.policy.vfc.VFCResponse;
import org.slf4j.Logger;
@@ -541,6 +542,12 @@ public class ControlLoopOperationManager implements Serializable {
}
private void storeOperationInDataBase(){
+ // Only store in DB if enabled
+ boolean guardEnabled = "false".equalsIgnoreCase(PolicyEngine.manager.getEnvironmentProperty("guard.disabled"));
+ if( !guardEnabled ){
+ return;
+ }
+
// DB Properties
Properties props = new Properties();