Do we have any updated approch for sendind the response from process to rest api or below code is enough ?
@RequestMapping(method=RequestMethod.POST)
public OrderResponse placeOrderPOST(String orderId, int amount) throws Exception {
ProcessInstance instance = camunda.getRuntimeService().startProcessInstanceByKey(//…
OrderResponse response = new OrderResponse();
for {
// query - and if count > 0 then use it to read variables
camunda.getHistoryService().createProcessInstanceQuery().endedI()...
}
return response;