# Retriving Http task taskid

**URL:** <https://forum.flowable.org/t/retriving-http-task-taskid/7260>\
**Category:** Flowable Engine\
**Created:** [January 1, 2021, 7:15am UTC](https://forum.flowable.org/t/retriving-http-task-taskid/7260 "2021-01-01T07:15:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![balajisundarajan8](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@balajisundarajan8](https://forum.flowable.org/u/balajisundarajan8)\
**Post date:** [January 1, 2021, 7:15am UTC](https://forum.flowable.org/t/retriving-http-task-taskid/7260/1 "2021-01-01T07:15:26Z")

</div>

We have Process model which contains Usertask and Httptask. During process invocation record gets inserted to task tables for Usertask. But Httptask doesn’t have any record in task tables.

Task Tables - ACT\_RU\_TASK, ACT\_HI\_TASKINST

Any idea how to get taskid for Httptask ?

---

<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:** [January 4, 2021, 8:37am UTC](https://forum.flowable.org/t/retriving-http-task-taskid/7260/2 "2021-01-04T08:37:19Z")

</div>

Hey @balajisundarajan8,

`ACT_RU_TASK ` and `ACT_HI_TASKINST` are only used for storing User Tasks (BPMN) and Human Tasks (CMMN). All other activities are stored in the `ACT_RU_ACTINST` and `ACT_HI_ACTINST` tables (the user task activities are also stored here).

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![balajisundarajan8](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@balajisundarajan8](https://forum.flowable.org/u/balajisundarajan8)\
**Post date:** [January 4, 2021, 9:51am UTC](https://forum.flowable.org/t/retriving-http-task-taskid/7260/3 "2021-01-04T09:51:50Z")

</div>

@filiphr, Thanks for the info. Please let us know using which Service class we can retrieve data from ACT\_RU\_ACTINST and ACT\_HI\_ACTINST ?

For Example, ACT\_RU\_Task we are using TaskService class.

---

<div class="post-metadata">

**Author:** ![jeff.gehly](https://avatars.discourse-cdn.com/v4/letter/j/edb3f5/32.png) [@jeff.gehly](https://forum.flowable.org/u/jeff.gehly)\
**Post date:** [January 11, 2021, 6:29pm UTC](https://forum.flowable.org/t/retriving-http-task-taskid/7260/4 "2021-01-11T18:29:19Z")

</div>

For historical records, (stuff in ACT\_HI\_ACTINST) the HistoryService (processEngine.getHistoryService()) is your service object of choice. Then you can run a query against it like the below one and get data about your HTTP Task history.

historyService.createHistoricActivityInstanceQuery().processInstanceId(targetProcessId).activityType(‘httpServiceTask’).list();

I haven’t played with the API for getting RU (runtime) items, but there will either be an ActivityService available as part of the process engine APIs, or you will be able to create an activity instance query from the RuntimeService that should work similar to the historical activity query. The JavaDocs should be somewhat helpful on that front.
