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