At runtime, I’ve checked my_response whose value is correct: {"a": "b"}. I believe that my_process_variable is assigned with {"a": "b"} (screenshot), but nothing happens…
Try other (weird?) approach: my_response.a within Result expression to get “b” in a process variable, but which one? I’m totally lost and prior posts do not discuss Camunda 8.8, which I use.
Is it possible to get a concrete example (not XML please but with modeler screenshots!). Thanks a lot…
From your screenshot, the entire response should be mapped into the variable my_response. This can be very useful to examine from the front-end to find out what you need to put into the Result Expression to process the response into variables.
You need to provide a JSON-like mapping of the variables in the Result Expression if you want to break the response down into distinct variables.
for example, if your response is {"a":"b"}
and your Result Expression is set to:
= {
my_response_a : response.body.a
}
Then your process variable my_response_a should have the value b
Many thanks GotnOGuts. This works fine. For the sake of clarity for forthcoming readers. The 2 fields seem (are?) independent. Result variable field is just the name of a new process variable to get the overall result of REST Connector execution. Result expression field allows the creation of another process variable to get more fine-tuned data. What was difficult to guess is response.body. Apart missing something, I didn’t see in the Camunda doc. the possibility of using response and response.body as entry point(s) in the FEEL expression. Regards.