class BpmnRestClient {

    public HttpResponse post(String recipeUri, String requestId, int recipeTimeout, String requestAction,
            String serviceInstanceId, String serviceType, String requestDetails, String recipeParamXsd)
            throws IOException {

        HttpClient client = HttpClientBuilder.create().build();

        HttpPost post = new HttpPost(recipeUri);
        RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(recipeTimeout)
                .setConnectTimeout(recipeTimeout).setConnectionRequestTimeout(recipeTimeout).build();
        post.setConfig(requestConfig);
        logger.debug("call the bpmn,  url: {}", recipeUri);
        String jsonReq = wrapResourceRequest(requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType,
                requestDetails, recipeParamXsd);

        StringEntity input = new StringEntity(jsonReq);
        input.setContentType(CONTENT_TYPE_JSON);
        String encryptedCredentials;
        encryptedCredentials = urnPropertiesReader.getVariable(CAMUNDA_AUTH);
        if (encryptedCredentials != null) {
            String userCredentials =
                    getEncryptedPropValue(encryptedCredentials, DEFAULT_BPEL_AUTH, ENCRYPTION_KEY_PROP);
            if (userCredentials != null) {
                post.addHeader("Authorization",
                        "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes()));
            }
        }

        post.setEntity(input);
        return client.execute(post);
    }

}