# Get historic task instances filtered by candidate group

**URL:** <https://forum.flowable.org/t/get-historic-task-instances-filtered-by-candidate-group/3675>\
**Category:** Flowable Engine\
**Created:** [April 4, 2019, 8:49am UTC](https://forum.flowable.org/t/get-historic-task-instances-filtered-by-candidate-group/3675 "2019-04-04T08:49:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas1](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@Thomas1](https://forum.flowable.org/u/Thomas1)\
**Post date:** [April 4, 2019, 8:49am UTC](https://forum.flowable.org/t/get-historic-task-instances-filtered-by-candidate-group/3675/1 "2019-04-04T08:49:31Z")

</div>

I’m trying to get all historic task instances filtered by candidate group but i cannot get any result.  
The same request for runtime task instance is working.  
After digging in database, i can see that ACT\_HI\_IDENTITYLINK is never populated while ACT\_RU\_IDENTITYLINK is.  
Do you know when historic identity link is supposed to be populated ?

I used this method for getting historic task instances (no result) :

```
List<HistoricTaskInstance> hrTasks = cmmnHistoryService.createHistoricTaskInstanceQuery()
            .taskCandidateGroupIn(Arrays.asList("group1","group2"))
            .caseInstanceId(caseInstanceId)
            .list();

```

And this one for getting task instances (one result) :

```
    List<Task> tasks = cmmnTaskService.createTaskQuery()
            .taskCandidateGroupIn(Arrays.asList("group1","group2"))
            .caseInstanceId(caseInstanceId)
            .list();

```

Thank you
