cancel
Showing results for 
Search instead for 
Did you mean: 

Get variables from historical tasks

behemot1
Champ in-the-making
Champ in-the-making
Is it possible to get variables from tasks,which were completed ?
The historic task can be obtained by calling HistoricTaskInstanceQuery methods.
But HistoricTaskInstance doesn't contain a method for getting task's variables.
Any ideas ?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
You should use the HistoricDetailQuery, which allows you to request variables (historic details) based on taskId, examle:

historyService.createHistoricDetailQuery().variableUpdates().taskId(historicTask.getId()).list();

Beware, your historylevel should be "full" to be able to have the task-variables be taken into history.