How can I update a variable value of a finished process instance?


#1

Hello everyone. I have a promble about update variable.
In my case I need provide a api for supported somebody to update user task form value of a process instance.
When the process instance at runtime (not yet finished) the api is all right.
But after the process instance finished to use the api update a variable value the camunda was throwed an exception tells that process instance not exists.
Here is my code
runtimeService.setVariable("variableName", newValue);
I know the promble at my code. The runtimeService only work to the process instances of not finished.

So my question is how can I update a variable value of a finished process instance ?

Thans you all.


#2

Why exactly would you need to update a process variable after the process is finished. Generally the history is simply a record of what has happened while the process is active, i’m interested as to why you might need to change a process variable after it’s finished.