Hi
I have a postman to launch a process adding businessKey
the request generated is something like
POST /engine-rest/process-definition/key/ProcessA/start HTTP/1.1
Content-Type: application/json
User-Agent: PostmanRuntime/7.17.1
Accept: /
Cache-Control: no-cache
Postman-Token: 73939e65-4db1-4744-86d0-9d89fd5b642a
Host: 10.29.150.172:85
Accept-Encoding: gzip, deflate
Content-Length: 30
Connection: keep-alive
{“businessKey” : “hellodelu” }
And it works perfectly ^^ the process starts with a businessKey
So the java implementation seemed very clear to me
final String resourceUrl = camundaprops.getServer() + “/process-definition/key/” + deploymentId + “/start”;
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.setConnection(“keep-alive”);
headers.setCacheControl(CacheControl.noCache());
MultiValueMap<String, Object> body = new LinkedMultiValueMap<String, Object>();
body.add(“businessKey”, “whatelse”);
HttpEntity<MultiValueMap<String, Object>> request = new HttpEntity<>(body, headers);
try {
ResponseEntity response = restTemplate.postForEntity(resourceUrl, request, String.class);
System.out.println(response);
} catch (RestClientException rce) {
System.out.println(rce.getMessage());
}
this kind of “build” for REST call is OK for anothers ressources
but when executing this i receive a 400 null systematically
i just don’t understand why
is there something i miss ??
Note:
in debug i can see
{businessKey=[whatelse]} for body
[Content-Type:“application/json”, Connection:“keep-alive”, Cache-Control:“no-cache”] for headers