The import of objects via Rest-API since the upgrade of the Automation Engine to 12.3.7HF1 or superior fails systematically with error "500", the same operation works fine if AWI is used instead.
The culprit seems to be that in UC_CLIENT_SETTINGS, the variable VERSION_MANAGEMENT is set to Y, this operation produces the following errors with a Posgresql database in the JCP log when importing UC_HOLIDAYS.F via Rest-API:
20220412/150948.873 - 38 U00045197 FileSync: Import object 'UC_HOLIDAYS.F' of type 'CALE' 20220412/150948.910 - 38 U00045014 Exception 'com.automic.database.api.DBException: "UPDATE OKG SET OKG_OH_Idnr = ? WHERE OKG_OH_Idnr = ?"' at 'com.automic.database.impl.DBConnectionImpl.executeInternal():475'. 20220412/150948.911 - 38 U00045015 The previous error was caused by 'org.postgresql.util.PSQLException: "ERROR: insert or update on table "okg" violates foreign key constraint "fk_okg_okb" 20220412/150948.911 - 38 Detail: Key (okg_oh_idnr, okg_okb_lnr)=(100404, 5) is not present in table "okb"."' at 'org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2565'. 20220412/150948.912 - 38 U00045099 The server replied with following status: '500'
The same operation with an Oracle Database throws a similar error:
20220413/160023.726 - 45 U00045197 FileSync: Import object 'UC_HOLIDAYS.F' of type 'CALE' 20220413/160023.804 - 45 U00045014 Exception 'com.automic.database.api.DBException: "UPDATE OKG SET OKG_OH_Idnr = ? WHERE OKG_OH_Idnr = ?"' at 'com.automic.database.impl.DBConnectionImpl.executeInternal():573'. 20220413/160023.804 - 45 U00045015 The previous error was caused by 'java.sql.SQLIntegrityConstraintViolationException: "ORA-02291: Integritäts-Constraint (UC4.FK_OKG_OKB) verletzt - übergeordneter Schlüssel nicht gefunden 20220413/160023.804 - 45 "' at 'oracle.jdbc.driver.T2CConnection.checkError():1002'.
Releases impacted : 12.3.7HF1 and superior, 21.0.2 and superior
Component : AUTOMATION ENGINE
Defect introduced in AE 12.3.7HF1 and 21.0.2 by correction AE-26977
Update to a fix version listed below or a newer version if available.
Fix version:
Component(s): Automation Engine
Automation Engine 12.3.8HF3 - Available
Automation.Engine 12.3.9 - Available
Automation.Engine 21.0.3 - Available