class AbstractCDSProcessingBBUtils {

    public void sendRequestToCDSClient(DelegateExecution execution) {

        logger.trace("Start AbstractCDSProcessingBBUtils.sendRequestToCDSClient for DelegateExecution object.");
        try {
            ExecutionServiceInput executionServiceInput = (ExecutionServiceInput) execution.getVariable(EXEC_INPUT);
            CDSResponse cdsResponse = getCdsResponse(executionServiceInput);
            execution.setVariable(CDS_STATUS, cdsResponse.status);

            if (cdsResponse.payload != null) {
                String payload = JsonFormat.printer().print(cdsResponse.payload);
                execution.setVariable(RESPONSE_PAYLOAD, payload);
            }

        } catch (Exception ex) {
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
        }
    }

}