code: private Task readTask(ChildTaskContainer parent, Integer id)
     {
        Table a0 = getTable("A0TAB");
        Table a1 = getTable("A1TAB");
        Table a2 = getTable("A2TAB");
        Table a3 = getTable("A3TAB");
        Table a4 = getTable("A4TAB");
  
        Task task = parent.addTask();
        MapRow a1Row = a1.find(id);
        MapRow a2Row = a2.find(id);
  
        setFields(A0TAB_FIELDS, a0.find(id), task);
        setFields(A1TAB_FIELDS, a1Row, task);
        setFields(A2TAB_FIELDS, a2Row, task);
        setFields(A3TAB_FIELDS, a3.find(id), task);
        setFields(A5TAB_FIELDS, a4.find(id), task);
  
        task.setStart(task.getEarlyStart());
        task.setFinish(task.getEarlyFinish());
        if (task.getName() == null)
        {
           task.setName(task.getText(1));
        }
  
        m_eventManager.fireTaskReadEvent(task);
  
        return task;
     }
docs: Read data for an individual task from the tables in a PEP file.
  
  @param parent parent task
  @param id task ID
  @return task instance