Retriving Http task taskid

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 ?

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

@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.

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.