MS _ Service Überprüfen der Ordnerkonfiguration
This commit is contained in:
@@ -114,11 +114,7 @@ Namespace Jobs
|
||||
If Config.ExportPath_DMZ <> String.Empty Then
|
||||
Logger.Debug("RuninDMZ - Using ExportPath_DMZ: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ)
|
||||
Config.ExportPath = Config.ExportPath_DMZ
|
||||
Else
|
||||
Config.ExportPath = Config.ExportPath
|
||||
End If
|
||||
Else
|
||||
Config.ExportPath = Config.ExportPath
|
||||
End If
|
||||
|
||||
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
||||
@@ -138,7 +134,10 @@ Namespace Jobs
|
||||
Cast(Of Integer).
|
||||
ToList()
|
||||
|
||||
Logger.Info("Found [{0}] completed envelopes.", oEnvelopeIds.Count)
|
||||
If oEnvelopeIds.Count > 0 Then
|
||||
Logger.Info("Found [{0}] completed envelopes.", oEnvelopeIds.Count)
|
||||
End If
|
||||
|
||||
Dim oTotal As Integer = oEnvelopeIds.Count
|
||||
Dim oCurrent As Integer = 1
|
||||
|
||||
@@ -157,16 +156,16 @@ Namespace Jobs
|
||||
Logger.Debug("Loading Envelope Data..")
|
||||
Dim oEnvelopeData = GetEnvelopeData(oId)
|
||||
|
||||
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
||||
oEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||
Logger.Debug("Replaced Path in oEnvelopeData.DocumentPath!")
|
||||
End If
|
||||
|
||||
|
||||
If oEnvelopeData Is Nothing Then
|
||||
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
|
||||
Throw New ArgumentNullException("EnvelopeData")
|
||||
End If
|
||||
|
||||
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
||||
oEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||
Logger.Debug("Replaced Path in oEnvelopeData.DocumentPath!")
|
||||
End If
|
||||
Logger.Debug("Burning Annotations to pdf ...")
|
||||
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
|
||||
If oBurnedDocument Is Nothing Then
|
||||
@@ -242,7 +241,7 @@ Namespace Jobs
|
||||
|
||||
Next
|
||||
|
||||
Logger.Info("Completed job {0} successfully!", JobId)
|
||||
Logger.Debug("Completed job {0} successfully!", JobId)
|
||||
Catch ex As MergeDocumentException
|
||||
Logger.Warn("Certificate Document job failed at step: Merging documents!")
|
||||
Logger.Error(ex)
|
||||
@@ -366,22 +365,24 @@ Namespace Jobs
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function BurnAnnotationsToPdf(pData As EnvelopeData) As Byte()
|
||||
Dim pEnvelopeId = pData.EnvelopeId
|
||||
Private Function BurnAnnotationsToPdf(pEnvelopeData As EnvelopeData) As Byte()
|
||||
Dim pEnvelopeId = pEnvelopeData.EnvelopeId
|
||||
|
||||
Logger.Info("Burning [{0}] signatures", pData.AnnotationData.Count)
|
||||
Dim oAnnotations = pData.AnnotationData
|
||||
Logger.Info($"Burning [{pEnvelopeData.AnnotationData.Count}] signatures")
|
||||
Dim oAnnotations = pEnvelopeData.AnnotationData
|
||||
Dim oInputPath = ""
|
||||
|
||||
If My.Settings.RuninDMZ Then
|
||||
oInputPath = pData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath)
|
||||
Logger.Debug("Replaced Path in pData.DocumentPath!")
|
||||
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
||||
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath)
|
||||
ElseIf Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
||||
oInputPath = pData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||
Logger.Debug("Replaced Path in pData.DocumentPath!")
|
||||
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
||||
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||
Else
|
||||
oInputPath = pEnvelopeData.DocumentPath
|
||||
End If
|
||||
|
||||
Logger.Info("Input path: [{0}]", oInputPath)
|
||||
Logger.Info($"Input path: [{oInputPath}]")
|
||||
Dim oDirectorySource As String = Path.GetDirectoryName(oInputPath)
|
||||
Dim split As String() = oDirectorySource.Split("\")
|
||||
ParentFolderUID = split(split.Length - 1)
|
||||
|
||||
Reference in New Issue
Block a user