Identify Local variable from ACT_HI_VARINST

Hello ,

Is there a way we can identify a local variable from the ACT_HI_VARINST or to put it in a differently is there a way to differentiate process variables vs local variables .

Version :- Camunda 7.13.0 Community Edition

Thanks
Dinesh

@dineshsb, ACT_HI_VARINST table contains both process variables and local variables.

I was setting below local variable in one of the user task. So here the scope of the local variables is to that task level.

delegateTask.setVariableLocal("notifyTaskListener", true);

Local variables will be persisted in ACT_HI_VARINST and can be identified with taskId. If taskId is present then the variables is local variable. If taskId is not present for that variable, then it’s a process variable.


Refer the below variables which has taskId for the local variables.

image


Execution flow of local variables create/update/remove:


@aravindhrs - I dont think we can truly go by task ID as in some cases it would be empty . Can you please try to set a local variable in servicetask and check if it works .

@aravindhrs - were you able to test the scenario i mentioned and get the desired result.