Hey, thank you in advance for assisting. I am currently having an issue trying to pass a date to a finishedBefore parameter in a Springboot project. I pass the date as advised by the camunda version 7. documentation but it does not go through with an error 00 : [{“type”:“InvalidRequestException”,“message”:“Cannot set query parameter ‘finishedBefore’ to value ‘2023-01-25T13:33:42.165%2b0100’: Cannot convert value “2023-01-25T13:33:42.165%2b0100” to java type java.util.Date”}]. The following is the snippet of code I am using
@GetMapping("/")
private Object testQueryEndpoint() {
RestTemplate restTemplate1 = new RestTemplate();
String uri = insureHubConfig.getCamundaUrl() + “/engine-rest” + “/history/process-instance/count?completed=true&finishedBefore=2023-01-25T13:33:42.165%2b0100”;
return restTemplate1.getForObject(uri, Object.class);
}
Perhaps try it without URL Encoding it first. It might be getting double URL Encoded, but only single decoded.
ie.
@GetMapping("/")
private Object testQueryEndpoint() {
RestTemplate restTemplate1 = new RestTemplate();
String uri = insureHubConfig.getCamundaUrl() + “/engine-rest” + “/history/process-instance/count?completed=true&finishedBefore=2023-01-25T13:33:42.16+0100”;
return restTemplate1.getForObject(uri, Object.class);
}