How to get the end activity of a case instance via query?

Hello everyone,

I am currently trying to get all completed activities of a specific case instance. Apparently i get every activity but the end activity of the case instance. I perform the following query:

historyService.createHistoricCaseActivityInstanceQuery()
.completed()
.caseInstanceId(id)
.orderByHistoricCaseActivityInstanceEndTime().asc()
.list();

Also the wanted end activity is shown as “terminated”. In my opinion it should have the state “completed”, shouldn’t it?
Is there any known workaround to get the full list of completed activities and the end activity?

Thanks in advance and best regards,
Kilian