cancel
Showing results for 
Search instead for 
Did you mean: 

How to collect all process finished tasks (not only user tasks)

edufrazao
Champ on-the-rise
Champ on-the-rise
Hi folks. I wanna know if theres any way to collect all finished tasks of a process definition, not only User Tasks, but also script tasks, email tasks, etc.

Thanks folks.
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

yes, it is.
Use history service with the proper history level.

Regards
Martin

Thank you Martin. It works.
Code used:
<code>
List<HistoricActivityInstance> instances = historyService.createHistoricActivityInstanceQuery()
    .processInstanceId(processInstanceId)
    .list();
</code>
Now i can display the process state on diagram Smiley Happy