Task task1 = m_file.getTaskByUniqueID(Integer.valueOf(taskID1));
Task task2 = m_file.getTaskByUniqueID(Integer.valueOf(taskID2));
if (task1 != null && task2 != null)
{
RelationType type = RelationType.getInstance(MPPUtility.getShort(data, 20));
TimeUnit durationUnits = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(data, 22));
Duration lag = MPPUtility.getDuration(MPPUtility.getInt(data, 24), durationUnits);
Relation relation = task2.addPredecessor(task1, type, lag);
m_file.fireRelationReadEvent(relation);
}
}