Error Message :
U00005118 Program error: Database access via key 'AH_Idnr' with value 0 in module 'UCGENX_R'.
The Automation Engine (AE) writes a forced trace during a Workflow start with the above error message.
Note: This only happens under specific circumstances where messages in AE are processed in the wrong order.
Investigation
An excerpt of the force trace: U00005118 Program error: Database access via key 'AH_Idnr' with value 0 in module 'UCGENX_R', and afterwards a force trace was created.
20160702/161424.943 - U00005118 Program error: Database access via key 'AH_Idnr' with value 0 in module 'UCGENX_R'.
00000090 00000000 00592E20 574E6C20 31312E32 >.....Y. WNl 11.2<
20160702/161424.943 - U00009909 TRACE: (Eingabespeicher) 0x0c9a2a80 022152
00000000 47454E58 20202020 30316400 05000000 >GENX 01d.....<
00000010 4F4B0000 414B5458 20202020 581B0000 >OK..AKTX X...<
00000020 5543342E 474C4F42 414C2E53 54415254 >UC4.GLOBAL.START<
00000030 55505F50 43455F41 47454E54 2E4A4F42 >UP_PCE_AGENT.JOB<
00000040 502E5355 422E5345 545F5245 534F5552 >P.SUB.SET_RESOUR<
00000050 4345537C 30303537 37393539 37370000 >CES|0057795977..<
20160702/161424.943 - U00009909 TRACE: (Conversationssp.) 0x7f9f8f160010 151400