code: private void readWBS(ChildTaskContainer parent, Integer id)
     {
        Integer currentID = id;
        Table table = getTable("WBSTAB");
  
        while (currentID.intValue() != 0)
        {
           MapRow row = table.find(currentID);
           Integer taskID = row.getInteger("TASK_ID");
           Task task = readTask(parent, taskID);
           Integer childID = row.getInteger("CHILD_ID");
           if (childID.intValue() != 0)
           {
              readWBS(task, childID);
           }
           currentID = row.getInteger("NEXT_ID");
        }
     }
docs: Recursively read the WBS structure from a PEP file.
  
  @param parent parent container for tasks
  @param id initial WBS ID