class MsoHeatUtils extends MsoCommonUtils implements VduPlugin {

    protected void saveStackRequest(CreateStackParam request, String requestId, String stackName) {
        try {
            ObjectMapper mapper = new ObjectMapper();
            InfraActiveRequests foundRequest = requestDBClient.getInfraActiveRequestbyRequestId(requestId);
            CreateStackRequest createStackRequest = new CreateStackRequest();
            createStackRequest.setEnvironment(request.getEnvironment());
            createStackRequest.setParameters(request.getParameters());
            String stackRequest = mapper.writeValueAsString(createStackRequest);
            CloudApiRequests cloudReq = new CloudApiRequests();
            cloudReq.setCloudIdentifier(stackName);
            cloudReq.setRequestBody(stackRequest);
            cloudReq.setRequestId(requestId);
            CloudApiRequests foundCloudReq = foundRequest.getCloudApiRequests().stream()
                    .filter(cloudReqToFind -> stackName.equals(cloudReq.getCloudIdentifier())).findAny().orElse(null);
            if (foundCloudReq != null) {
                foundCloudReq.setRequestBody(stackRequest);
            } else {
                foundRequest.getCloudApiRequests().add(cloudReq);
            }
            requestDBClient.updateInfraActiveRequests(foundRequest);
        } catch (Exception e) {
            logger.error("Error updating in flight request with Openstack Create Request", e);
        }
    }

}