@Niall, no, there is no errors in log and response status is success (204). But new transient variable wasn’t be created - i check it with GET /process-instance/{id}/variables.
If variable is not transient - it will be created.
Hello, @thorben.
Yes, i know that transient variables are not persisting to DB and live only in memory till first transaction boundary. But before this ‘fatal’ transaction, they are alive and, of course, can be fetched by GET /process-instance/{id}/variables - such it works if i create this var for execution with POST /execution/{id}/localVariables ( where id is execution of current task in this process instance)
I think you have a misunderstanding about transaction handling in Camunda. Every API call coresponds to one transaction, regardless if it advances the process or not. Things that are not persisted do not live longer than the duration of the API call. Transaction boundaries in the process only control how much of the process is executed within a transaction that triggers continuation (e.g. user task completion, job execution). Using the set variables API is pretty much unrelated to that.
Can anyone say, please, why via POST /execution/{id}/localVariablestransient variable can be created (and saved to execution, can be fetched by GET and visible in cockpit), but with POST /process-instance/{id}/variables it doesn’t appear in process instance execution?