From 9fca18ae906779e41ff3e084629faf65b4e7e571 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Wed, 14 Oct 2015 18:54:39 +0530 Subject: [PATCH] Fixing the monitoring issue --- .../carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java index e72b1d25fa2..75350b3fdcc 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/mgt/impl/MonitoringManagerImpl.java @@ -27,9 +27,7 @@ import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; -import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfigRepository; import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration; -import org.wso2.carbon.device.mgt.core.dao.DeviceDAO; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.core.dao.DeviceTypeDAO; import org.wso2.carbon.device.mgt.core.dto.DeviceType; @@ -320,6 +318,7 @@ public class MonitoringManagerImpl implements MonitoringManager { if (!deviceIdsToAddOperation.isEmpty()) { // monitoringDAO.addComplianceDetails(firstTimeDeviceIdsWithPolicyIds); monitoringDAO.addComplianceDetails(firstTimeDevices); + monitoringDAO.updateAttempts(new ArrayList<>(deviceIdsToAddOperation.keySet()), false); } if (!deviceIdsWithExistingOperation.isEmpty()) {