String parentCollectionPath = CEPConstants.CEP_CONF_ELE_CEP_BUCKETS + CEPConstants.CEP_REGISTRY_BS + bucketName;
String queriesCollectionPath = parentCollectionPath + CEPConstants.CEP_REGISTRY_BS + CEPConstants.CEP_REGISTRY_QUERIES;
String queryPath = queriesCollectionPath + "/" + queryName;
try {
Registry registry = CEPServiceValueHolder.getInstance().getRegistry(tenantId);
if (registry.resourceExists(queryPath)) {
registry.delete(queryPath);
}
} catch (RegistryException e) {
String errorMessage = "Error in deleting the query to be deleted ";
log.error(errorMessage, e);