How to fetch historic user task instances in Camunda 8.8 (C7 → C8 migration)?

Context & Goal
I’m migrating from Camunda 7 to Camunda 8.8. In C7, I relied on the HistoryService to query completed/assigned user tasks:


// Camunda 7
HistoricTaskInstanceQuery historicTask = historyService
    .createHistoricTaskInstanceQuery()
    .taskDefinitionKeyIn("task1", "task2", "task3");

In Camunda 8.8, my user task is the Camunda user task (zeebe:userTask). During the Task listeners execution I have a JobClient and ActivatedJob, and I need to retrieve historic user task instances (e.g., previously created/completed tasks by definition key) to drive assignment and validation logic. My main objective is to get the assignee for achieving the automatically Assign Users.

Question

  • Is there an equivalent API in Camunda 8 to fetch historic task instances (like HistoricTaskInstanceQuery in C7)?

  • If not, what is the recommended approach to access historic user task data in Camunda 8.8?

Thanks in advance for any pointers, examples, or architectural advice!

Hi @Mkknowledge

You can use this REST api to search/fetch user tasks (also completed ones): Search user tasks | Camunda 8 Docs

regards,

Maarten

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.