cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a process endEvent id using the history API

meditel
Champ in-the-making
Champ in-the-making
Hi,

I have a process with 2 endEvents ('endevent1' & 'endevent2').
How shall i know after the process execution has finished if it ended on 'endevent1' or 'endevent2' ?
I see the 'ACT_HI_PROCINST' table having what i need. But i don't know how can i query this table using the API 😕

BR,
Meditel
1 REPLY 1

meditel
Champ in-the-making
Champ in-the-making
Hi,

I will answer my own question :

String pid = "XXXXXX";
processEngine.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).singleResult().getEndActivityId();

Hope this helps someone Smiley Wink

BR,
Meditel