class SDNOHealthCheckTasks {

    public void sdnoHealthCheck(BuildingBlockExecution execution) {
        boolean response = false;
        try {
            GeneralBuildingBlock gBBInput = execution.getGeneralBuildingBlock();
            RequestContext requestContext = gBBInput.getRequestContext();

            GenericVnf vnf = null;
            Map<ResourceKey, String> lookupMap = execution.getLookupMap();
            for (Map.Entry<ResourceKey, String> entry : lookupMap.entrySet()) {
                if (entry.getKey().equals(ResourceKey.GENERIC_VNF_ID)) {
                    vnf = extractPojosForBB.extractByKey(execution, entry.getKey());
                }
            }

            response = sdnoHealthCheckResources.healthCheck(vnf, requestContext);
        } catch (Exception ex) {
            logger.error("Exception occurred", ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex.getMessage());
        }

        if (!response) {
            logger.error("SDNO Health Check failed");
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "SDNO Health Check failed");
        }
    }

}