WINDREAM CheckFileExistsinWM falsches Log
This commit is contained in:
parent
8da8bd18a7
commit
0810983f86
@ -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")>
|
||||
|
||||
@ -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,16 +1243,21 @@ Public Class Windream
|
||||
|
||||
Try
|
||||
Dim oType As Integer = GetIndexType(IndexName)
|
||||
Dim oConvertedValue As Object = Helpers.ConvertIndexValue(oType, Value)
|
||||
If Not IsNothing(oType) Then
|
||||
Dim oConvertedValue As Object = Helpers.ConvertIndexValue(oType, Value)
|
||||
|
||||
oWMObject.SetVariableValue(IndexName, oConvertedValue)
|
||||
oWMObject.Save()
|
||||
oWMObject.SetVariableValue(IndexName, oConvertedValue)
|
||||
oWMObject.Save()
|
||||
|
||||
If UnlockObject(oWMObject) = False Then
|
||||
_logger.Warn("File {0} could not be unlocked", Path)
|
||||
If UnlockObject(oWMObject) = False Then
|
||||
_logger.Warn("File {0} could not be unlocked", Path)
|
||||
End If
|
||||
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
UnlockObject(oWMObject)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user