List all open user tasks of a process instance

I try get all user tasks of a process instance.
example. I have 3 three user task (start --> My Task 1 --> My Task 2 --> My Task 3 --> End).
I started process and after that I use TaskService.createQueryTask() , it only show 1 task (My Task 1).

I want to show list all tasks ( My Task 1, My Task 2, My Task 3) when started process.
Because. I want to assignee dynamic when started process.

Please let my know how to get all tasks of process instance.

createTaskQuery will only show the current task that is open. My Task 1 will be the only task in wait state when the process is initiated. Showing the other task that follows you may need to use the api to query the model.

The api I forgot to mention is repositoryService.getBpmnModel

1 Like

Thank you. I got a Process model and list flow elements.