class ResumeOrchestrationRequest {

    @POST
    @Path("/{version:[vV][7]}/{requestId}/resume")
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    @Operation(description = "Resume request for a given requestId", responses = @ApiResponse(
            content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))))
    @Transactional
    public Response resumeOrchestrationRequest(@PathParam("requestId") String requestId,
            @PathParam("version") String version, @Context ContainerRequestContext requestContext) throws ApiException {

        Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
        String currentRequestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID);
        logger.info("Beginning resume operation for new request: {}", currentRequestId);
        InfraActiveRequests infraActiveRequest = null;
        String source = MDC.get(MdcConstants.ORIGINAL_PARTNER_NAME);
        String requestorId = MDC.get(HttpHeadersConstants.REQUESTOR_ID);
        requestHandlerUtils.getRequestUri(requestContext, uriPrefix);
        String requestUri = MDC.get(LogConstants.HTTP_URL);
        version = version.substring(1);

        try {
            infraActiveRequest = requestsDbClient.getInfraActiveRequestbyRequestId(requestId);
        } catch (HttpClientErrorException e) {
            logger.error("Error occurred while performing requestDb lookup by requestId: " + requestId, e);
            ErrorLoggerInfo errorLoggerInfo =
                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.AvailabilityError).build();
            throw new ValidateException.Builder("Exception while performing requestDb lookup by requestId",
                    HttpStatus.SC_NOT_FOUND, ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB).cause(e)
                            .errorInfo(errorLoggerInfo).build();
        }

        InfraActiveRequests currentActiveRequest = requestHandlerUtils.createNewRecordCopyFromInfraActiveRequest(
                infraActiveRequest, currentRequestId, startTimeStamp, source, requestUri, requestorId, requestId);

        if (infraActiveRequest == null) {
            logger.error("No infraActiveRequest record found for requestId: {} in requesteDb lookup", requestId);
            ErrorLoggerInfo errorLoggerInfo =
                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, ErrorCode.BusinessProcessError)
                            .build();
            ValidateException validateException = new ValidateException.Builder(
                    "Null response from requestDB when searching by requestId: " + requestId, HttpStatus.SC_NOT_FOUND,
                    ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).errorInfo(errorLoggerInfo).build();
            requestHandlerUtils.updateStatus(currentActiveRequest, Status.FAILED, validateException.getMessage());
            throw validateException;

        }

        return resumeRequest(infraActiveRequest, currentActiveRequest, version, requestUri);
    }

}