class ActivateVnfStatusOperationalEnvironment {

    public void execute(String requestId, CloudOrchestrationRequest request) throws ApiException {

        try {

            String operationalEnvironmentId = "";

            String sdcDistributionId = request.getDistributionId();
            Distribution sdcStatus = request.getDistribution();

            // Distribution, Query for operationalEnvironmentId, serviceModelVersionId, origRequestId
            this.queryDistributionDbResponse = client.getDistributionStatusById(sdcDistributionId);
            operationalEnvironmentId = this.queryDistributionDbResponse.getOperationalEnvId();
            this.origRequestId = this.queryDistributionDbResponse.getRequestId();

            // ServiceModel, Query for recoveryAction, retryCountString
            this.queryServiceModelResponse =
                    client.findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestId(operationalEnvironmentId,
                            queryDistributionDbResponse.getServiceModelVersionId(), this.origRequestId);

            processActivateSDCStatus(sdcDistributionId, sdcStatus, this.queryDistributionDbResponse,
                    this.queryServiceModelResponse);

            // After EVERY status processed, need to query the status of all service modelId
            // to determine the OVERALL status if "COMPLETE" or "FAILURE":
            checkOrUpdateOverallStatus(operationalEnvironmentId, this.origRequestId);

            // Update AAI to ACTIVE if Overall success
            if (isOverallSuccess) {
                String vnfOperationalEnvironmentId = this.queryServiceModelResponse.getVnfOperationalEnvId();
                OperationalEnvironment aaiOpEnv = getAAIOperationalEnvironment(vnfOperationalEnvironmentId);
                if (aaiOpEnv != null) {
                    aaiOpEnv.setOperationalEnvironmentStatus("ACTIVE");
                    aaiHelper.updateAaiOperationalEnvironment(vnfOperationalEnvironmentId, aaiOpEnv);
                } else {
                    requestDb.updateInfraFailureCompletion("Unable to update ACTIVATE status in AAI. ",
                            this.origRequestId, this.queryServiceModelResponse.getVnfOperationalEnvId());
                }
            }

        } catch (Exception e) {
            logger.error("Exception in execute", e);
            requestDb.updateInfraFailureCompletion(e.getMessage(), this.origRequestId,
                    this.queryServiceModelResponse.getVnfOperationalEnvId());
        }

    }

}