class ActivateVnfOperationalEnvironment {

    public void execute(String requestId, CloudOrchestrationRequest request) throws ApiException {
        String vnfOperationalEnvironmentId = request.getOperationalEnvironmentId();

        String vidWorkloadContext = request.getRequestDetails().getRequestParameters().getWorkloadContext();
        List<ServiceModelList> serviceModelVersionIdList =
                request.getRequestDetails().getRequestParameters().getManifest().getServiceModelList();

        String ecompOperationalEnvironmentId = null;
        AAIResultWrapper wrapper = getAAIOperationalEnvironment(vnfOperationalEnvironmentId);
        Optional<Relationships> optRelationships = wrapper.getRelationships();
        if (optRelationships.isPresent()) {
            Relationships relationships = optRelationships.get();
            List<AAIResourceUri> operationalEnvironments = relationships.getRelatedUris(Types.OPERATIONAL_ENVIRONMENT);
            if (!operationalEnvironments.isEmpty()) {
                ecompOperationalEnvironmentId = operationalEnvironments.get(0).getURIKeys().get(
                        AAIFluentTypeBuilder.Types.OPERATIONAL_ENVIRONMENT.getUriParams().operationalEnvironmentId);
            }
        }
        logger.debug("  vnfOperationalEnvironmentId   : {}", vnfOperationalEnvironmentId);
        logger.debug("  ecompOperationalEnvironmentId : {}", ecompOperationalEnvironmentId);

        OperationalEnvironment operationalEnv = wrapper.asBean(OperationalEnvironment.class).get();
        String workloadContext = operationalEnv.getWorkloadContext();
        logger.debug("  aai workloadContext: {}", workloadContext);
        if (!vidWorkloadContext.equals(workloadContext)) {
            ErrorLoggerInfo errorLoggerInfo =
                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
                            .build();
            throw new ValidateException.Builder(
                    " The vid workloadContext did not match from aai record. " + " vid workloadContext:"
                            + vidWorkloadContext + " aai workloadContext:" + workloadContext,
                    HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo)
                            .build();
        }
        if (ecompOperationalEnvironmentId == null) {
            ErrorLoggerInfo errorLoggerInfo =
                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.BusinessProcessError)
                            .build();
            throw new ValidateException.Builder(
                    " The ECOMP OE was not in aai record; the value of relationship.relationship-data key: "
                            + AAIFluentTypeBuilder.Types.OPERATIONAL_ENVIRONMENT
                                    .getUriParams().operationalEnvironmentId,
                    HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo)
                            .build();
        }

        processActivateSDCRequest(requestId, ecompOperationalEnvironmentId, serviceModelVersionIdList, workloadContext,
                vnfOperationalEnvironmentId);

    }

}