code: private void readRelationships()
     {
        for (MapRow row : getTable("CONTAB"))
        {
           Task task1 = m_projectFile.getTaskByUniqueID(row.getInteger("TASK_ID_1"));
           Task task2 = m_projectFile.getTaskByUniqueID(row.getInteger("TASK_ID_2"));
  
           if (task1 != null && task2 != null)
           {
              RelationType type = row.getRelationType("TYPE");
              Duration lag = row.getDuration("LAG");
              Relation relation = task2.addPredecessor(task1, type, lag);
              m_eventManager.fireRelationReadEvent(relation);
           }
        }
     }
docs: Read relationship data from a PEP file.