}
// Verify if condition is used in any autoscale policy
if (_autoScalePolicyConditionMapDao.isConditionInUse(conditionId)) {
s_logger.info("Cannot delete condition " + conditionId + " as it is being used in a condition.");
throw new ResourceInUseException("Cannot delete Condition when it is in use by one or more AutoScale Policies.");
}
boolean success = _conditionDao.remove(conditionId);
if (success) {
s_logger.info("Successfully deleted condition " + condition.getId());
}