Viewing path of tasks done by a process instance

cancel
Showing results for 
Search instead for 
Did you mean: 
aabb_activiti
Member II

Viewing path of tasks done by a process instance

Hello ,

I have developed a workflow using eclipse plugin , and activiti java api to run / manage this workflow.

Everything is going ok , however , im trying at the end of the process to print the path of tasks done by the process instance . Im using historicInsatnce as following:

List<HistoricActivityInstance> activities =
historyService.createHistoricActivityInstanceQuery()
.processInstanceId(processInstance.getId()).finished()
.orderByHistoricActivityInstanceEndTime().asc()
.list();

*The problem is :

This method is missing some tasks (usually the task just before the end event).So , although i know for sure that this task was executed , it is not included in the list and not printed.

How can this be solved ?

Thanks

2 Replies
bhchemss
Established Member

Re: Viewing path of tasks done by a process instance

Hi,

Thats strange !

Did you try to query on 

HistoricTaskInstance ?
aabb_activiti
Member II

Re: Viewing path of tasks done by a process instance

Hi

You are right! it is strange. 

I thought only user tasks are queried by these queries , however reading docs shows otherwise .

Yes , i tried using HistoricTaskInstance indeed.