Put variable to completed (in history) process instance

Hi. I’d like to ask, whether it’s possible to put variable or somehow update process instance, which was already completed. I found only this endpoint Put Process Variable | docs.camunda.org, which returns error message: “Cannot modify variables for process instance {processInstanceId}: execution {processInstanceId} doesn’t exist: execution is null”.

Thanks in advance.

Not that I know of. I think the idea is that once a process instance is completed, there is usually no need to update the variables it contained. For purposes of auditing, in some environments it’s most likely not even allowed. The History Service offers mainly read operations from what I can tell, which is also reflected in the REST API. Most of the operations that may change the history deal with cleaning up the otherwise ever growing size of your historic archive.

@peter.wright you can’t update any of the historic(completed) instances, because the execution data is removed from runtime tables, so even if you try you will get execution {processInstanceId} doesn’t exist: execution is null”. The historic data of already completed instances can be only read or deleted, other operations are not possible.

If you have a requirement to update completed instances, you can restart the instance and update the variables.