Cannot get tasks with taskService.createTaskQuery()

Hi, I wan to start new process instance within a service task, and I got null when I try to get tasks.
These are my codes.
Start new process instance : runtimeService.startProcessInstanceById(processDefinitionId, variables);
Get tasks : taskService.createTaskQuery().processInstanceBusinessKey(processInstance.getRootProcessInstanceId()).active().list()

I debugged and found that the program didn’t insert into ACT_RU_TASK, so it cannot find any tasks.
Could you help me with this?
Thank you.

@user3 Does the process has any user tasks or waiting states? Could share your bpmn file?

Can you try taskService.createTaskQuery().singleResult(); this would return results only if there are active tasks created and not completed when you execute this