/// <summary> /// Does the audit log. /// </summary> /// <param name="documentIdentifierEntityBeos">The document identifier entity beos.</param> /// <param name="productionName">Name of the production.</param> private void DoAuditLog(List <DocumentIdentifierEntityBEO> documentIdentifierEntityBeos, string productionName) { try { if (documentIdentifierEntityBeos == null || !documentIdentifierEntityBeos.Any()) { return; } productionName.ShouldNotBeEmpty(); Utility.SetUserSession(m_BootParameters.CreatedBy); AuditBO.LogDocumentProduced(_matterId, documentIdentifierEntityBeos, productionName); } catch (Exception ex) { //putting try catch to avoid the case of not sending documents to validation worker where required operations for reprocessing is done ex.AddDbgMsg("Unable to update audit logs"); ex.Trace().Swallow(); } }
/// <summary> /// Inserts the audit log. /// </summary> /// <param name="exportDocumentCollection">The export document collection.</param> /// <param name="sJobName">Name of the s job.</param> private void InsertAuditLog(ExportDocumentCollection exportDocumentCollection, string sJobName) { try { Utility.SetUserSession(_exportLoadJobDetailBeo.CreatedBy); var documentIdentifierEntities = exportDocumentCollection.Documents.Select(exportDocumentDetail => new DocumentIdentifierEntityBEO { CollectionId = exportDocumentCollection.Dataset.CollectionId, CollectionName = exportDocumentCollection.Dataset.FolderName, Dcn = exportDocumentDetail.DCN, DocumentReferenceId = exportDocumentDetail.DocumentId }).ToList(); AuditBO.LogDocumentsExported(exportDocumentCollection.Dataset.Matter.FolderID, documentIdentifierEntities, sJobName); } catch (Exception ex) { Tracer.Info("Failure on insert audit log for export {0}", ex.Message); } }