I can't seem to figure out the traversal path to get all tasks and their sub-tasks for a given process instance id!
I tried
taskService.createTaskQuery().processInstanceId(processInstanceId).list();
But this only gives tasks directly under the processInstanceId, not sub-tasks that may be under parent tasks.
Anyone have an example of getting all tasks for a processInstanceId?
Thanks,
Ryan