I have created a process in which i created multiple tasks.
Task service can provide me all the tasks belong my process.
List<Task> tasks = taskService.createTaskQuery().processInstanceId(processInstanceId).list();
But how will i determine, the sequence flow b/w the tasks. i.e Which is my first task. what is the next task?