I am using processApi.updateActivityInstanceVariables to update process variable for a particular task, I am getting successful response, but when I am routing forward to next step, i see value is going with default value only. Is there any way I can see a process variable’s value by providing process instance id?
TIA
Hi,
By definition an activity variable has its lifecycle tied to the activity lifecycle. It means that when the activity is submitted and the process moves to the next activity, all the variables linked to the previous activity are archived. Then, the value of the next activities will have the default value as defined in the diagram.
If you want to define a variable that the same lifecycle than the process instance, you need to define a variable at the process level.
Cheers
Lio