Implementation POST /process-definition/key/{key}/start

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
Accept-Encoding: gzip, deflate
Content-Length: 30
Connection: keep-alive
{“businessKey” : “hellodelu” }

And it works perfectly ^^ the process starts with a businessKey :smiley:

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();
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);
} catch (RestClientException rce) {

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 ??

in debug i can see

{businessKey=[whatelse]} for body
[Content-Type:“application/json”, Connection:“keep-alive”, Cache-Control:“no-cache”] for headers

Hi @flo,

You should use the process definition key instead of the deploymentId.

Hope this helps, Ingo

hi thx for replying
argh its just a name of variable. maybe confusing i assume

i just make it work with

JsonObject json = new JsonObject();
json.addProperty(“businessKey”, businessKey);

instead of MultiValueMap. Strange …

Can i ask one more question : is it possible to change the businessKey of a process instance? because i get something very exclusive making different every instance of a process but i get that data in the middle of the process
so i try with a sub process but his businessKey (seems to) inherits from his parent

Hi @flo,

you can change the value of the business key:

Hope this helps, Ingo