code: private void processPredecessors(ProjectType project)
     {
        for (RelationshipType row : project.getRelationship())
        {
  
           Task currentTask = m_projectFile.getTaskByUniqueID(mapTaskID(row.getSuccessorActivityObjectId()));
           Task predecessorTask = m_projectFile.getTaskByUniqueID(mapTaskID(row.getPredecessorActivityObjectId()));
           if (currentTask != null && predecessorTask != null)
           {
              RelationType type = RELATION_TYPE_MAP.get(row.getType());
              Duration lag = getDuration(row.getLag());
              Relation relation = currentTask.addPredecessor(predecessorTask, type, lag);
              relation.setUniqueID(row.getObjectId());
              m_eventManager.fireRelationReadEvent(relation);
           }
        }
     }
docs: Process predecessors.
  
  @param project xml container