WINDREAM CheckFileExistsinWM falsches Log

This commit is contained in:
SchreiberM 2024-01-05 08:23:04 +01:00
parent 8da8bd18a7
commit 0810983f86
2 changed files with 18 additions and 10 deletions

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.3.0")>
<Assembly: AssemblyFileVersion("1.9.3.0")>
<Assembly: AssemblyVersion("1.9.4.0")>
<Assembly: AssemblyFileVersion("1.9.4.0")>

View File

@ -116,6 +116,7 @@ Public Class Windream
Public ReadOnly Property UsesDriveLetter As Boolean = True
Public Property NewDocumentID As Int32 = 0
Public Property CurrentWMObject As IWMObject6
''' <returns>A list of object types that are available</returns>
Public ReadOnly Property ObjectTypes As List(Of String)
@ -256,7 +257,7 @@ Public Class Windream
oWMObject = Session.GetWMObjectByPath(WMEntityDocument, pPath)
Return True
Catch ex As Exception
_logger.Info($"Unexpected Error in windream.GetFileByPath: {ex.Message}")
_logger.Info($"Unexpected Error in windream.CheckFileExistsinWM: {ex.Message}")
_logger.Error(ex)
Return False
End Try
@ -303,6 +304,7 @@ Public Class Windream
Dim oType = oAttribute.GetVariableValue("dwAttrType")
Return oType
Catch ex As Exception
_logger.Warn($"Error in Windream.GetIndexType for Indexname [{IndexName}]")
_logger.Error(ex)
Return Nothing
End Try
@ -785,10 +787,11 @@ Public Class Windream
Return False
End Try
_logger.Info($"File '{FilenameTarget}' was streamed.")
_logger.Info($"File '{FilenameTarget}' has been streamde successfully!")
Dim oDocid = GetIndexValue(FilenameTarget, "Dokument-ID")
If Not IsNothing(oDocid) Then
NewDocumentID = oDocid(0)
CurrentWMObject = oWMObject
End If
Return True
@ -1240,6 +1243,7 @@ Public Class Windream
Try
Dim oType As Integer = GetIndexType(IndexName)
If Not IsNothing(oType) Then
Dim oConvertedValue As Object = Helpers.ConvertIndexValue(oType, Value)
oWMObject.SetVariableValue(IndexName, oConvertedValue)
@ -1250,6 +1254,10 @@ Public Class Windream
End If
Return True
Else
Return False
End If
Catch ex As Exception
_logger.Error(ex)
UnlockObject(oWMObject)