Thanks Martin,
could you please give me more details about the query?
I saw that with HistoricProcessInstanceQuery I can retrieve unfinished processes, but I need also distinguish suspended processes from those in receive task.
Both processes are in ACT_HI_PROCINST table and are unfinished.
The used statement is the following:
<java>List<HistoricProcessInstance> unfinishedProcs = historyService.createHistoricProcessInstanceQuery().unfinished().list();</java>