Ms logging

This commit is contained in:
SchreiberM 2024-06-25 15:45:00 +02:00
parent 322fb2fd7e
commit 27a5538229
2 changed files with 7 additions and 3 deletions

View File

@ -47,6 +47,7 @@ Namespace Jobs
Private Class EnvelopeData Private Class EnvelopeData
Public EnvelopeId As Integer Public EnvelopeId As Integer
Public EnvelopeUUID As String
Public DocumentPath As String Public DocumentPath As String
Public AnnotationData As List(Of String) Public AnnotationData As List(Of String)
Public DocAsByte As Byte() Public DocAsByte As Byte()
@ -421,7 +422,7 @@ Namespace Jobs
Dim split As String() = oDirectorySource.Split("\") Dim split As String() = oDirectorySource.Split("\")
ParentFolderUID = split(split.Length - 1) ParentFolderUID = split(split.Length - 1)
Else Else
ParentFolderUID = pEnvelopeData.EnvelopeId ParentFolderUID = pEnvelopeData.EnvelopeUUID
End If End If
@ -443,7 +444,7 @@ Namespace Jobs
End Function End Function
Private Function GetEnvelopeData(pEnvelopeId As Integer) As EnvelopeData Private Function GetEnvelopeData(pEnvelopeId As Integer) As EnvelopeData
Dim oSql = $"SELECT T.GUID, T2.FILEPATH, T2.BYTE_DATA FROM [dbo].[TBSIG_ENVELOPE] T Dim oSql = $"SELECT T.GUID, T.ENVELOPE_UUID,T2.FILEPATH, T2.BYTE_DATA FROM [dbo].[TBSIG_ENVELOPE] T
JOIN TBSIG_ENVELOPE_DOCUMENT T2 ON T.GUID = T2.ENVELOPE_ID JOIN TBSIG_ENVELOPE_DOCUMENT T2 ON T.GUID = T2.ENVELOPE_ID
WHERE T.GUID = {pEnvelopeId}" WHERE T.GUID = {pEnvelopeId}"
Dim oTable As DataTable = Database.GetDatatable(oSql) Dim oTable As DataTable = Database.GetDatatable(oSql)
@ -457,7 +458,8 @@ Namespace Jobs
.EnvelopeId = pEnvelopeId, .EnvelopeId = pEnvelopeId,
.DocumentPath = oRow.ItemEx("FILEPATH", ""), .DocumentPath = oRow.ItemEx("FILEPATH", ""),
.AnnotationData = oAnnotationData, .AnnotationData = oAnnotationData,
.DocAsByte = DirectCast(oRow.Item("BYTE_DATA"), Byte()) .DocAsByte = DirectCast(oRow.Item("BYTE_DATA"), Byte()),
.EnvelopeUUID = oRow.ItemEx("ENVELOPE_UUID", "")
} }
Logger.Debug("Document path: [{0}]", oData.DocumentPath) Logger.Debug("Document path: [{0}]", oData.DocumentPath)

View File

@ -38,6 +38,8 @@ Namespace Jobs.FinalizeDocument
For Each oJSON In pInstantJSONList For Each oJSON In pInstantJSONList
If AddInstantJSONAnnotationToPDF(oJSON) = False Then If AddInstantJSONAnnotationToPDF(oJSON) = False Then
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
Logger.Warn(oJSON)
Throw New BurnAnnotationException($"Adding Annotation failed") Throw New BurnAnnotationException($"Adding Annotation failed")
End If End If
Next Next