cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti : Last completed task

madhusudanjoshi
Champ on-the-rise
Champ on-the-rise
<b>Problem</b>

I want to get the last task completed for the process instance. I am able to get the last completed human task, but not a Service task.

<b>What i have tried</b>

I have written a SQL query, i am using MySQL, to find out what is last task that is completed. Here it goes :
<blockcode>
SELECT * FROM act_hi_taskinst
where PROC_INST_ID_= '1234' and END_TIME_ IS  NOT NULL
order by END_TIME_ desc;
</blockcode>
act_hi_taskinst is the table that gets updated as and when the process instance progresses.

The process flow goes something like this :

A human Task (Leave request) -> Service task( Check availability of leave) -> service task(Check feasibility) -> A human task(Manager task)

When the task comes to Manager Task the last completed is Check feasibility, but its not reflecting in database.

<b>Can you please help</b>

Does activiti provide any such API to get the last completed service task? Can you suggest some SQL query to solve the problem.
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
The data will not be stored in act_hi_taskinst, but in ACT_HI_ACTINST . act_hi_taskinst is only for user tasks (because queries there are way more common)

nicholascurren
Champ in-the-making
Champ in-the-making
Thanks jbarrez!! Smiley Happy


testosterone boosters
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.