Merged PR 28616: Added flags to switch whether or not to add the records to the next queue.

Added flags to switch whether or not to add the records to the next queue.
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-10-17 00:35:15 +00:00
parent 05e0fb3eda
commit 315abcde86

View File

@ -303,7 +303,7 @@ Service ProcessArchiveQueue()
readnext ArchiveQueueId else Done = 1 readnext ArchiveQueueId else Done = 1
until Done until Done
ArchiveId = XLATE('ARCHIVE_QUEUE', ArchiveQueueId, ARCHIVE_QUEUE_ARCHIVE_ID$, 'X') ArchiveId = XLATE('ARCHIVE_QUEUE', ArchiveQueueId, ARCHIVE_QUEUE_ARCHIVE_ID$, 'X')
Archive_Services('ArchiveRecords', ArchiveId) Archive_Services('ArchiveRecords', ArchiveId, True$)
If Error_Services('HasError') then If Error_Services('HasError') then
ProcessError = Error_Services('GetMessage') ProcessError = Error_Services('GetMessage')
Error_Services('Clear') Error_Services('Clear')
@ -355,7 +355,7 @@ Step 2.2 of data archiving procedures.
Parameters - Parameters -
ArchiveId - The key ID to the ARCHIVE record being processed. ArchiveId - The key ID to the ARCHIVE record being processed.
*/ */
Service ArchiveRecords(ArchiveId) Service ArchiveRecords(ArchiveId, AddToDeleteQ)
ErrorMsg = '' ErrorMsg = ''
@ -401,11 +401,13 @@ Service ArchiveRecords(ArchiveId)
end end
Next Record Next Record
If ErrorMsg EQ '' then If ErrorMsg EQ '' then
if AddToDeleteQ then
Archive_Services('AddToDeleteQueue', ArchiveId) Archive_Services('AddToDeleteQueue', ArchiveId)
If Error_Services('HasError') then If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage') ErrorMsg = Error_Services('GetMessage')
end end
end end
end
end else end else
ErrorMsg = 'Archive record had zero child records.' ErrorMsg = 'Archive record had zero child records.'
end end
@ -1604,3 +1606,4 @@ return