CREATE OR REPLACE TRIGGER RelationInsertTrigger
INSTEAD OF INSERT ON Relation
FOR EACH ROW
BEGIN
    INSERT INTO DT465 
        (UUID, DI001202, DI001203, DI001200, DI001201, 
        DI007348, DI001206, DI001216, DI001497, 
        DI001498, DI009342, DI001489, DI001057,
        DI001204, LONGEST_PATH) 
    SELECT 
        :new.UUID, pred.DI001097, pred.DI001098, succ.DI001097, succ.DI001098, 
        :new.DI007348, :new.DI001206, :new.DI001216, :new.DI001497, 
        :new.DI001498, :new.DI009342, :new.DI001489, :new.DI001057,
        position_sequence.nextval, :new.LONGEST_PATH
    FROM 
        DT463 pred
        CROSS JOIN DT463 succ
    WHERE 
        pred.UUID = :new."activityPredecessorUUID" AND
        succ.UUID = :new."activitySuccessorUUID"; 
END RelationInsertTrigger;
;/
ALTER TRIGGER RelationInsertTrigger ENABLE;/