// tell the agent first - we don't want the agent reporting on the drift def after we delete it
boolean unscheduledOnAgent = false;
try {
AgentClient agentClient = agentManager.getAgentClient(subjectManager.getOverlord(), resourceId);
DriftAgentService service = agentClient.getDriftAgentService();
service.unscheduleDriftDetection(resourceId, doomedDriftDef);
unscheduledOnAgent = true;
} catch (Exception e) {
log.warn(" Unable to inform agent of unscheduled drift detection [" + doomedDriftDef + "]", e);
}