moved log variables to prevent VNAVS when failing to read transaction record
This commit is contained in:
@ -142,7 +142,6 @@ Service ProcessTransactionQueue()
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Transaction'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
@ -152,6 +151,8 @@ Service ProcessTransactionQueue()
|
||||
objQueueLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoSub ClearCursors
|
||||
|
||||
Select 'TRANSACTION_QUEUE' by 'TRANSACTION_DTM' setting Cursor then
|
||||
EOF = False$
|
||||
Loop
|
||||
@ -162,10 +163,13 @@ Service ProcessTransactionQueue()
|
||||
Until EOF
|
||||
TransRec = Database_Services('ReadDataRow', 'TRANSACTION_QUEUE', TransId)
|
||||
If Error_Services('NoError') then
|
||||
Action = TransRec<TRANSACTION_QUEUE.ACTION$>
|
||||
Table = TransRec<TRANSACTION_QUEUE.TABLE$>
|
||||
Key = TransRec<TRANSACTION_QUEUE.KEY$>
|
||||
HaveLock = Database_Services('GetKeyIDLock', Table, Key)
|
||||
Action = TransRec<TRANSACTION_QUEUE.ACTION$>
|
||||
Table = TransRec<TRANSACTION_QUEUE.TABLE$>
|
||||
Key = TransRec<TRANSACTION_QUEUE.KEY$>
|
||||
LogData<3> = Action
|
||||
LogData<4> = Table
|
||||
LogData<5> = Key
|
||||
HaveLock = Database_Services('GetKeyIDLock', Table, Key)
|
||||
If HaveLock then
|
||||
Begin Case
|
||||
Case Action EQ 'WRITE_FIELD'
|
||||
@ -212,9 +216,6 @@ Service ProcessTransactionQueue()
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<3> = Action
|
||||
LogData<4> = Table
|
||||
LogData<5> = Key
|
||||
If ErrorMsg EQ '' then
|
||||
// Log success
|
||||
LogData<2> = 'Successfully processed transaction ':TransId:'.'
|
||||
@ -230,3 +231,16 @@ Service ProcessTransactionQueue()
|
||||
|
||||
end service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
|
||||
return
|
||||
|
||||
|
@ -277,7 +277,7 @@ WRITE_RECORD_PRE:
|
||||
Continue = True$
|
||||
For each CriticalField in CriticalFields using @VM setting vPos
|
||||
|
||||
If ( ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) or ( DCount(OrigRecord<CriticalField>, @VM) GT DCount(Record<CriticalField>, @VM) ) ) then
|
||||
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then
|
||||
WOMatFieldNos = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_PART$, 'X')
|
||||
WOMatFieldNames = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_DISPLAY$, 'X')
|
||||
Locate CriticalField in WOMatFieldNos using @VM setting FieldNo then
|
||||
@ -929,4 +929,3 @@ Restore_System_Variables:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user