In action "insertion of rejects for AK" line 26, uses CONSTRAINT_REF instead of REF.
insert into %x{md:physicalPath($REF,'rejectName')}x%
(
row_id,
REJECT_MODE,
REJECT_MESSAGE,
REJECTED_BY,
RULE_NAME,
RULE_TYPE,
REJECT_DATE,
%x{md:patternList($REF/ref:columns()[tech:isMapped()],'[colName]', ',\n\t')}x%
)
select
rowid(CTRL),
'%x{$REF/tech:rejectMode()}x%',
'%x{$CONSTRAINT_REF/tech:rejectMessage()}x%',
'%x{$REF/tech:rejectedBy()}x%',
'%x{$CONSTRAINT_REF/tech:name()}x%',
'%x{$CONSTRAINT_REF/tech:constraintCode()}x%',
%x{$REF/ref:target()/tech:dateFunction()}x%,
%x{md:patternList($REF/ref:columns()[tech:isMapped()],'CTRL.[colName]', ',\n\t')}x%
from %x{md:physicalPath($REF,'checkedName')}x% AS CTRL
where exists (
select 'R'
from %x{md:physicalPath($REF,'checkedName')}x% TARG
where %x{md:patternList($REF/ref:columns()[if ($REF/tech:rejectMode()='S') then tech:isPK() else tech:isUK()],'TARG.[colName]=CTRL.[colName]', '\n\t\tand\t\t')}x%
group by %x{md:patternList($CONSTRAINT_REF/ref:columns()[tech:isAk()],'TARG.[colName]', ',\n\t\t\t')}x%
having count(1) > 1
)
%x{$REF/tech:filterPart()}x%