Set process name to HTTP response

This answer is really close: Change process name after start

Unfortunately this fails:


because = ["name"] not "name". Can anyone please help?

What does your REST response returns, how does the json look like?
Also, are you storing the response as a variable?

Thanks for the reply! I discovered the Jackson object mapper:

import com.fasterxml.jackson.databind.ObjectMapper;
ObjectMapper mapper = new ObjectMapper();

runtimeService.setProcessInstanceName(execution.getProcessInstanceId(), mapper.writeValueAsString(response.process_name));