cancel
Showing results for 
Search instead for 
Did you mean: 

how to get last HistoricTaskInstance in a finished process?

mofaji
Champ in-the-making
Champ in-the-making
In fact, I want to get the process has been finished last task variable
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Use the HistoricTaskInstanceQuery and do a "orderByHistoricTaskInstanceEndTime().desc().list(0,1)" or something to get the last completed task.

For the variables, use HistoricDetailsQuery together with "taskId().orderByTime()" or something similar…