class OofCallbackHandler {

    @PostMapping("/{version:[vV][1]}/{messageEventName}/{correlator}")
    public ResponseEntity<String> processCallback(@PathVariable("messageEventName") String messageEventName,
            @PathVariable("correlator") String correlator, @RequestBody String oofCallbackRequest)
            throws OofAdapterException {
        logger.debug("Oof Async response received for event : {} , callback request body : {} ", messageEventName,
                oofCallbackRequest);
        String camundaMsgUrl = utils.getCamundaMsgUrl(messageEventName, correlator);
        HttpEntity<String> request = new HttpEntity<String>(oofCallbackRequest, utils.getCamundaHeaders());
        try {
            ResponseEntity<String> response = restTemplate.postForEntity(camundaMsgUrl, request, String.class);
            logger.debug("Response from BPMN : {} ", response);
            return response;
        } catch (Exception e) {
            logger.warn("Error injecting message event into BPMN {} {} ", e.getCause(), e.getMessage());
            throw new OofAdapterException(e);
        }

    }

}