MS _ Service Überprüfen der Ordnerkonfiguration
This commit is contained in:
parent
02d883dfbf
commit
d4a9eba6ab
@ -114,11 +114,7 @@ Namespace Jobs
|
|||||||
If Config.ExportPath_DMZ <> String.Empty Then
|
If Config.ExportPath_DMZ <> String.Empty Then
|
||||||
Logger.Debug("RuninDMZ - Using ExportPath_DMZ: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ)
|
Logger.Debug("RuninDMZ - Using ExportPath_DMZ: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ)
|
||||||
Config.ExportPath = Config.ExportPath_DMZ
|
Config.ExportPath = Config.ExportPath_DMZ
|
||||||
Else
|
|
||||||
Config.ExportPath = Config.ExportPath
|
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
Config.ExportPath = Config.ExportPath
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
||||||
@ -138,7 +134,10 @@ Namespace Jobs
|
|||||||
Cast(Of Integer).
|
Cast(Of Integer).
|
||||||
ToList()
|
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 oTotal As Integer = oEnvelopeIds.Count
|
||||||
Dim oCurrent As Integer = 1
|
Dim oCurrent As Integer = 1
|
||||||
|
|
||||||
@ -157,16 +156,16 @@ Namespace Jobs
|
|||||||
Logger.Debug("Loading Envelope Data..")
|
Logger.Debug("Loading Envelope Data..")
|
||||||
Dim oEnvelopeData = GetEnvelopeData(oId)
|
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
|
If oEnvelopeData Is Nothing Then
|
||||||
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
|
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
|
||||||
Throw New ArgumentNullException("EnvelopeData")
|
Throw New ArgumentNullException("EnvelopeData")
|
||||||
End If
|
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 ...")
|
Logger.Debug("Burning Annotations to pdf ...")
|
||||||
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
|
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
|
||||||
If oBurnedDocument Is Nothing Then
|
If oBurnedDocument Is Nothing Then
|
||||||
@ -242,7 +241,7 @@ Namespace Jobs
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Logger.Info("Completed job {0} successfully!", JobId)
|
Logger.Debug("Completed job {0} successfully!", JobId)
|
||||||
Catch ex As MergeDocumentException
|
Catch ex As MergeDocumentException
|
||||||
Logger.Warn("Certificate Document job failed at step: Merging documents!")
|
Logger.Warn("Certificate Document job failed at step: Merging documents!")
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
@ -366,22 +365,24 @@ Namespace Jobs
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function BurnAnnotationsToPdf(pData As EnvelopeData) As Byte()
|
Private Function BurnAnnotationsToPdf(pEnvelopeData As EnvelopeData) As Byte()
|
||||||
Dim pEnvelopeId = pData.EnvelopeId
|
Dim pEnvelopeId = pEnvelopeData.EnvelopeId
|
||||||
|
|
||||||
Logger.Info("Burning [{0}] signatures", pData.AnnotationData.Count)
|
Logger.Info($"Burning [{pEnvelopeData.AnnotationData.Count}] signatures")
|
||||||
Dim oAnnotations = pData.AnnotationData
|
Dim oAnnotations = pEnvelopeData.AnnotationData
|
||||||
Dim oInputPath = ""
|
Dim oInputPath = ""
|
||||||
|
|
||||||
If My.Settings.RuninDMZ Then
|
If My.Settings.RuninDMZ Then
|
||||||
oInputPath = pData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath)
|
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
||||||
Logger.Debug("Replaced Path in pData.DocumentPath!")
|
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath)
|
||||||
ElseIf Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
ElseIf Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
||||||
oInputPath = pData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
||||||
Logger.Debug("Replaced Path in pData.DocumentPath!")
|
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||||
|
Else
|
||||||
|
oInputPath = pEnvelopeData.DocumentPath
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Logger.Info("Input path: [{0}]", oInputPath)
|
Logger.Info($"Input path: [{oInputPath}]")
|
||||||
Dim oDirectorySource As String = Path.GetDirectoryName(oInputPath)
|
Dim oDirectorySource As String = Path.GetDirectoryName(oInputPath)
|
||||||
Dim split As String() = oDirectorySource.Split("\")
|
Dim split As String() = oDirectorySource.Split("\")
|
||||||
ParentFolderUID = split(split.Length - 1)
|
ParentFolderUID = split(split.Length - 1)
|
||||||
|
|||||||
@ -351,5 +351,6 @@ Public Class frmMain
|
|||||||
Else
|
Else
|
||||||
BarCheckItem1.Checked = False
|
BarCheckItem1.Checked = False
|
||||||
End If
|
End If
|
||||||
|
RefreshTimer.Start()
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@ -156,6 +156,9 @@
|
|||||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Service.resx">
|
||||||
|
<DependentUpon>Service.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="My Project\Application.myapp">
|
<None Include="My Project\Application.myapp">
|
||||||
|
|||||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.6.0.0")>
|
<Assembly: AssemblyVersion("1.7.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.7.0.0")>
|
||||||
|
|||||||
5
EnvelopeGenerator.Service/Service.Designer.vb
generated
5
EnvelopeGenerator.Service/Service.Designer.vb
generated
@ -41,8 +41,11 @@ Partial Class Service
|
|||||||
' Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
' Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()>
|
<System.Diagnostics.DebuggerStepThrough()>
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
components = New System.ComponentModel.Container()
|
'
|
||||||
|
'Service
|
||||||
|
'
|
||||||
Me.ServiceName = "EnvelopeGenerator.Service"
|
Me.ServiceName = "EnvelopeGenerator.Service"
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
123
EnvelopeGenerator.Service/Service.resx
Normal file
123
EnvelopeGenerator.Service/Service.resx
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
Loading…
x
Reference in New Issue
Block a user