Added troubleshooting logs to find cause of LBLCHK transactions going missing

This commit is contained in:
Infineon\Ouellette
2025-07-29 14:06:51 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent 03f42dedea
commit 6934799e92
2 changed files with 167 additions and 2 deletions

View File

@ -47,6 +47,14 @@ LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Front-end Create Log.csv'
Headers = 'Logging DTM'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_MAT_LOG'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_Post_Log.csv'
Headers = 'Logging DTM'
objLogPost = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
IsProd = Environment_Services('IsProd')
@ -250,6 +258,7 @@ RETURN
* * * * * * *
Post:
* * * * * * *
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
ServiceKeyID = 'Obj_WO_Mat_Log*Post'
Lock hSysLists, ServiceKeyID then
@ -350,7 +359,29 @@ Post:
LockedToolID = ScanToolID
LockedScanEntry = ScanEntry
END
//Log the error
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = Tag
LogData<5> = ScanUserId
LogData<6> = ScanToolId
LogData<7> = ScanEntry
LogData<8> = 'Error reported from obj_wo_mat -> Add InvTrans. Check specific log.'
Logging_Services('AppendLog', objLogPost, LogData, @RM, @FM)
END else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = WONo
LogData<3> = CassNo
LogData<4> = Tag
LogData<5> = ScanUserId
LogData<6> = ScanToolId
LogData<7> = ScanEntry
LogData<8> = 'Successfully process obj_wo_mat -> AddInvTrans. Check specific log file for more details.'
Logging_Services('AppendLog', objLogPost, LogData, @RM, @FM)
end
NEXT I
WMLRec<WO_MAT_LOG_WO_NO$> = LockedWONos
@ -376,3 +407,4 @@ Post:
RETURN