How to access completed tasks and render data in their user tasks forms

hello @shches,
Did you find any solutions for this issue? For me I’ve worked with this code historic-completed-tasks-variables-by-assignee-and-processbusinesskey , It gives me completed tasks only but for me I need variables from each task.

historyService.createHistoricVariableInstanceQuery()
.processDefinitionKey(PROCESS_KEY)
.list();

The code above is to get historic variables only. So how can I get variables from each completed task?
Any help, thank you