# Unfinished HistoricTaskInstance

**URL:** <https://forum.flowable.org/t/unfinished-historictaskinstance/6934>\
**Category:** Flowable Engine\
**Created:** [October 15, 2020, 5:09pm UTC](https://forum.flowable.org/t/unfinished-historictaskinstance/6934 "2020-10-15T17:09:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akki](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@akki](https://forum.flowable.org/u/akki)\
**Post date:** [October 15, 2020, 5:09pm UTC](https://forum.flowable.org/t/unfinished-historictaskinstance/6934/1 "2020-10-15T17:09:07Z")

</div>

Hi,  
In a basic process like this:  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/9/913369fb302e77ebfa90b2070f2a90d1100d7957.png)

If I use the below code in the implementation of `Service Task 1`  
**Code:**

> List historicTaskInstances = historyService.createHistoricTaskInstanceQuery()  
> .processInstanceId( execution.getProcessInstanceId() )  
> .unfinished()  
> .list();

I always get the details of `User Task 1`.  
Does that mean `User Task 1` is not finished until it reaches next wait state in process?

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [October 16, 2020, 6:16am UTC](https://forum.flowable.org/t/unfinished-historictaskinstance/6934/2 "2020-10-16T06:16:12Z")

</div>

Hey @akki,

The query you are using is fetching data from the database. However, the data from the current transaction is not yet pushed to the database. Flowable will only send the data to the DB at the end of the transaction.

In order to achieve what you are looking for you will need to make your service task async.

Cheers,  
Filip
