we are currently considering the use of a service task with a delegate class within which we want to fetch some values and return these values inside the response to the initial api call that started the process via “…/rest/process-definition/key/processkey/start”. Inside the request body of the api call we pass some variables which we intend to update during the execution of the delegate’s execute method. Besides, the request body contains the corresponding flag for “withVariablesInReturn” : “true”. However, the response to the api request happens before any of the variables can be updated via execution.setVariable(…).
Is there something we are missing or is this use case simply not intended? Any other approaches that might help with this issue? Thanks in advance for your help!