From 65266e068599fd45f18c12e1484404e116fb784c Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 9 Nov 2020 19:48:24 +0530 Subject: [PATCH] Handle re-applying of failed policies via monitoring through a different operation code --- .../policy/mgt/core/impl/ComplianceDecisionPointImpl.java | 2 +- .../carbon/policy/mgt/core/util/PolicyManagementConstants.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java index 5914f223ca..2c0ba22e8a 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/ComplianceDecisionPointImpl.java @@ -153,7 +153,7 @@ public class ComplianceDecisionPointImpl implements ComplianceDecisionPoint { PolicyOperation policyOperation = new PolicyOperation(); policyOperation.setEnabled(true); policyOperation.setType(Operation.Type.POLICY); - policyOperation.setCode(PolicyOperation.POLICY_OPERATION_CODE); + policyOperation.setCode(PolicyManagementConstants.MONITOR_POLICY_BUNDLE); if (complianceData.isCompletePolicy()) { List effectiveFeatures = policy.getProfile().getProfileFeaturesList(); diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagementConstants.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagementConstants.java index e945f98127..3841662c2c 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagementConstants.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/util/PolicyManagementConstants.java @@ -40,6 +40,7 @@ public final class PolicyManagementConstants { public static final String DEVICE_CONFIG_XML_NAME = "cdm-config.xml"; public static final String ANY = "ANY"; public static final String POLICY_BUNDLE = "POLICY_BUNDLE"; + public static final String MONITOR_POLICY_BUNDLE = "MONITOR_POLICY_BUNDLE"; public static final String TENANT_ID = "TENANT_ID";