Unable to get Variables for a usertask

Hi,
When I use elastic search with query something like bellow localhost:9200/zeebe-record-job/_search?pretty, I am getting records but there are no variables for the user task. The variable fields are empty
“value”: {
“type”: “io.camunda.zeebe:userTask”,
“errorMessage”: “”,
“processInstanceKey”: 2251799814642687,
“retries”: 1,
“retryBackoff”: 0,
“bpmnProcessId”: “Process_1b3g0kl”,
“variables”: {},
“processDefinitionKey”: 2251799814642654,
“elementInstanceKey”: 2251799814642705,
“recurringTime”: -1,
“processDefinitionVersion”: 3,
“elementId”: “Activity_1kaiptk”,
“customHeaders”: {},
“deadline”: -1,
“errorCode”: “”,
“worker”: “”
},

I need to get the variable data. I am using Camunda process from an UI app. The UI app first starts the process and process sends some data back to UI and waits for the response using a human task (user task). I need to get the user task at which the process is waiting and its variables.

Hi @Gopalkrishna_Kulkarn - are you using Tasklist for user tasks, or have you built your own UI?

I am not using Tasklist as it is paid/licensed. I am querying elasticsearcsearch index
localhost:9200/zeebe-record-job/_search

Thanks
Regards
Gopal

Hello @Gopalkrishna_Kulkarn ,

Variables are exported in another index zeebe-record-variable. They are linked to flow nodes instances.
Then, you need to compute the scoped variables of your user task

I hope this can help