If you define a precondition on a JOBS, where you set an Object Variable with a
IF ... THEN ... ELSE and use the same variable name in both the then and else sections you get the following error:
U00003590 UCUDB - DB error: 'ERROR: duplicate key value violates unique constraint "pk_ev" DETAIL: Key (ev_ah_idnr, ev_vname)=(1017730, &VARIABLE#) already exists.', '', '', ''
U00003592 UCUDB - Status: '23505' Native error: '-1555077639' Msg: 'duplicate key value violates unique constraint "pk_ev"'
U00003594 UCUDB Ret: '6' opcode: 'INSR' SQL Stmnt: 'INSERT INTO EV (EV_AH_Idnr, EV_VName, EV_Source, EV_SortOrder, EV_ERTUsage) VALUES (?, ?, ?, ?, ?)'
U00003590 UCUDB - DB error: 'ERROR: duplicate key value violates unique constraint "pk_ev" DETAIL: Key (ev_ah_idnr, ev_vname)=(1017730, &VARIABLE#) already exists.', '', '', ''
U00003592 UCUDB - Status: '23505' Native error: '-1555077639' Msg: 'duplicate key value violates unique constraint "pk_ev"'
U00003594 UCUDB Ret: '3590' opcode: 'INSR' SQL Stmnt: 'INSERT INTO EV (EV_AH_Idnr, EV_VName, EV_Source, EV_SortOrder, EV_ERTUsage) VALUES (?, ?, ?, ?, ?)'
U00003620 Routine 'UCGENX_R' forces trace because of error.
U00003590 UCUDB - DB error: 'INSERT INTO EV (EV_AH_Idnr, EV_VName, EV_Source, EV_SortOrder, EV_ERTUsage) VALUES (?, ?, ?, ?, ?)', 'ERROR ', '23505', 'duplicate key value violates unique constraint "pk_ev"'
U00011801 Error in Server routine 'UCGENX_R', Server: 'AUTOMIC#WP005' AE system: 'AUTOMIC'.
U00003590 UCUDB - DB error: 'INSERT INTO EV (EV_AH_Idnr, EV_VName, EV_Source, EV_SortOrder, EV_ERTUsage) VALUES (?, ?, ?, ?, ?)', 'ERROR ', '23505', 'duplicate key value violates unique constraint "pk_ev"'
The task remains in 'Checking Preconditions' until it is manually cancelled.