In what scenario a task's parentTaskId not null?

I created a task inside an expanded sub process (multi instance), and I am getting parentTaskId as null, In what scenario a task’s parentTaskId is not null? also how to get the list of tasks created inside a sub process from /tasks?

Hi @vermauv,

If you create a subtask of a task then that task id would be the parentTaskId of the subtask.

https://docs.camunda.org/manual/7.8/reference/rest/task/post-create/

In order to get list of tasks belongs to a specific sub process, you should query tasks as in below docs with executionId of sub process provided

https://docs.camunda.org/manual/7.8/reference/rest/task/post-query/

Thanks @hassang :slight_smile: