public async Task UpdateExportJobExpectedNumberOfExports(Int32 expectedNumberOfExports, ExportManagerQueueRecord exportManagerQueueRecord)
        {
            try
            {
                RaiseAndLogDebugMessage("Updating export job expected number of exports.");

                await ArtifactQueries.UpdateExportJobStatitics(RsapiRepositoryGroup.RdoRepository, RsapiApiOptions, exportManagerQueueRecord.WorkspaceArtifactId, exportManagerQueueRecord.ExportJobArtifactId, expectedNumberOfExports, 0, 0, 0);

                RaiseAndLogDebugMessage("Updated export job expected number of exports.");
            }
            catch (Exception ex)
            {
                throw new AdminMigrationUtilityException(Constant.ErrorMessages.UpdateExportJobExpectedNumberError, ex);
            }
        }
        private async Task FinalizeJobStatiaticsAsync(ExportManagerQueueRecord exportManagerQueueRecord, Int32 actualNumberOfExportedRecords)
        {
            var jobRDO = await RetrieveExportJobRDO(exportManagerQueueRecord);

            var expectedNumberOfExports = jobRDO[Constant.Guids.Field.ExportUtilityJob.Expected].ValueAsWholeNumber.GetValueOrDefault();

            if (expectedNumberOfExports > 0)
            {
                var notExported = (await ArtifactQueries.QueryJobErrors(RsapiApiOptions, RsapiRepositoryGroup.RdoRepository, exportManagerQueueRecord.WorkspaceArtifactId, exportManagerQueueRecord.ExportJobArtifactId)).Count();
                await ArtifactQueries.UpdateExportJobStatitics(
                    rdoRepository : RsapiRepositoryGroup.RdoRepository,
                    rsapiApiOptions : RsapiApiOptions,
                    workspaceArtifactId : exportManagerQueueRecord.WorkspaceArtifactId,
                    jobArtifactID : exportManagerQueueRecord.ExportJobArtifactId,
                    expectedNumberOfExports : expectedNumberOfExports,
                    actualNumberOfExports : actualNumberOfExportedRecords,
                    notExported : notExported,
                    recordsThatHaveBeenProcessed : expectedNumberOfExports);
            }
        }