Preconditions on a JOBS are causing a duplicate key on "pk_ev"

book

Article ID: 130087

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

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. 

Environment

This only occurs when a PostgreSQL Database is installed on the Linux Operating System.
When the PostgreSQL Database is installed on a Windows Operating System there is no issue.

Resolution

Preconditions cause JOBS to hang in checking Preconditions status only on Linux with PostgreSQL Database A problem has been fixed where Preconditions caused JOBS hanging in Checking Preconditions status only on Linux with PostgreSQL Database.

Additional Information

To obtain the correction for this issue please install one of the following versions or later:

Automation Engine 12.2.2 HF2 - Available
Automation Engine 12.2.3 - currently planned for the beginning of June 2019 
Automation Engine 12.3.0 - currently planned for the end of June 2019

The effected components are Utilities and the Automation Engine.