class SDNCRequestTasks {

    public void callSDNC(DelegateExecution execution) {
        SDNCRequest request = (SDNCRequest) execution.getVariable(SDNC_REQUEST);
        try {
            String response = sdncClient.post(request.getSDNCPayload(), request.getTopology());
            String finalMessageIndicator = JsonPath.read(response, "$.output.ack-final-indicator");
            execution.setVariable("isSDNCCompleted", convertIndicatorToBoolean(finalMessageIndicator));
        } catch (PathNotFoundException e) {
            logger.error("Error Parsing SDNC Response. Could not find read final ack indicator from JSON.", e);
            exceptionBuilder.buildAndThrowWorkflowException(execution, 7000,
                    "Recieved invalid response from SDNC, unable to read message content.", ONAPComponents.SO);
        } catch (MapperException e) {
            logger.error("Failed to map SDNC object to JSON prior to POST.", e);
            exceptionBuilder.buildAndThrowWorkflowException(execution, 7000,
                    "Failed to map SDNC object to JSON prior to POST.", ONAPComponents.SO);
        } catch (BadResponseException e) {
            logger.error("Did not receive a successful response from SDNC.", e);
            exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, e.getLocalizedMessage(),
                    ONAPComponents.SDNC);
        } catch (HttpClientErrorException e) {
            logger.error("HttpClientErrorException: 404 Not Found, Failed to contact SDNC", e);
            exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, "SDNC cannot be contacted.",
                    ONAPComponents.SO);
        }
    }

}