in src/main/java/com/epam/digital/data/platform/el/juel/AbstractSignatureJuelFunction.java [41:59]
protected static <T> T sendRequest(String data, SignFormat container, String bpmnErrorCode,
BiFunction<SignInfoRequestDto, HttpHeaders, T> dsoOperation) {
var idmService = getBean("system-user-keycloak-client-service", IdmService.class);
var accessToken = idmService.getClientAccessToken();
var signInfoRequestDto = SignInfoRequestDto.builder()
.data(data)
.container(container)
.build();
var headers = createHeaders(accessToken);
try {
return dsoOperation.apply(signInfoRequestDto, headers);
} catch (InvalidSignatureException e) {
throw new BpmnError(bpmnErrorCode, e.getErrorDto().getLocalizedMessage());
} catch (InternalServerErrorException ex) {
throw new SignatureProcessingException(ex.getErrorDto().getMessage());
} catch (Exception exception) {
throw new SignatureProcessingException(exception.getMessage());
}
}