Compare commits

..

3 Commits

Author SHA1 Message Date
OlgunR
61f6029001 Update group box texts and refresh ImageList resources
Clarified GroupBox1 and GroupBox2 text to include both re-indexing and post-processing errors. Updated ImageList1.ImageStream in the resource file, likely reflecting changes to form images.
2026-04-27 15:05:24 +02:00
OlgunR
de47ed9f3b Update assembly version to 2.10.0.0
Bumped the assembly version in AssemblyInfo.vb from 2.9.9.0 to 2.10.0.0 to reflect the new release. The file version remains at 2.9.9.0.
2026-04-27 14:57:47 +02:00
OlgunR
e9a78cf6a4 Improve error handling and logging for rights and indexing
Enhanced error handling in ClassWD_Rechte to unlock objects after exceptions and prevent resource locks. Refactored frmNIHauptseite to add detailed debug logging and robust error handling in File_SetBooleanIndex, including better handling of missing or invalid index values. Replaced SetErrorMeldung with File_SetBooleanIndex for AD post-processing errors. These changes improve traceability and reliability.
2026-04-27 11:30:37 +02:00
5 changed files with 28 additions and 9 deletions

View File

@@ -393,13 +393,13 @@ Public Class ClassWD_Rechte
End Function
Private Function WorkRight(_methode As String, createdFolder As String, _form As Boolean, oWMObject As WINDREAMLib.WMObject, deleteRights As Boolean, folgeRegel As Boolean, _UserOrGroup As String,
_GruppenUserRecht As String, _lRight As Integer) As Boolean
Dim Object2Change As WINDREAMLib.WMObject = Nothing
Try
Dim _Erfolgreich As Boolean = True
Dim UserGroupRelation
Dim UserOrGroup
Dim oGroup
Dim oUSer
Dim Object2Change As WINDREAMLib.WMObject
If _methode = "AddRightFolder" Then
Object2Change = oWMObject.aParentWMObject
ElseIf _methode = "AddRightCreatedFolder" Then
@@ -731,6 +731,13 @@ Public Class ClassWD_Rechte
Return _Erfolgreich
Catch ex As Exception
_Logger.Error(ex)
Try
If Object2Change IsNot Nothing AndAlso Object2Change.aLocked Then
Object2Change.unlock()
_Logger.Debug("WorkRight Catch: Object2Change unlocked after error.")
End If
Catch
End Try
Return False
End Try
End Function

View File

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

View File

@@ -1913,7 +1913,7 @@ Public Class frmNIHauptseite
If adReworkOk = False Then
_Logger.Warn($"## Nachbearbeitung AD für [{pMyWMDoc.aName}] fehlgeschlagen - Error-Index wird gesetzt")
File_SetBooleanIndex(True, pMyWMDoc, aktivesProfil.IndexValidation)
SetErrorMeldung("Rechtevergabe fehlgeschlagen", pMyWMDoc, aktivesProfil.IndexFehler)
File_SetBooleanIndex(True, pMyWMDoc, aktivesProfil.IndexFehler)
End If
Else
If aktivesProfil.NachbearbeitungAD = True Then
@@ -2547,12 +2547,22 @@ Public Class frmNIHauptseite
'Ab Hier Error prüfen
Sub File_SetBooleanIndex(ByVal _value As Boolean, ByVal _dok As WINDREAMLib.WMObject, ByVal _Indexname As String)
Try
_Logger.Debug($"File_SetBooleanIndex called: Index=[{_Indexname}] Value=[{_value}] Doc=[{If(_dok IsNot Nothing, _dok.aName, "NULL")}]")
If _Indexname <> "" Then
'Überprüfen ob Boolean-Value bereits gesetzt wurde?
Dim akt_Status As Boolean = CBool(_dok.GetVariableValue(_Indexname))
Dim akt_Status As Boolean = False
Try
Dim rawValue As Object = _dok.GetVariableValue(_Indexname)
_Logger.Debug($"File_SetBooleanIndex: rawValue=[{If(rawValue IsNot Nothing, rawValue.ToString, "NULL")}]")
If rawValue IsNot Nothing Then
akt_Status = CBool(rawValue)
End If
Catch ex As Exception
_Logger.Debug($"File_SetBooleanIndex: GetVariableValue threw exception - treating as False. Error: {ex.Message}")
akt_Status = False
End Try
If akt_Status <> _value Then
'Index muß angepasst werden
_Logger.Debug("Validation Index not set to '" & _value.ToString & "'.")
_Logger.Debug($"File_SetBooleanIndex: writing [{_value}] to index [{_Indexname}]")
Dim arrIndex() As String = Nothing
Dim arrValue() As String = Nothing
'Nun die Datei indexieren
@@ -2577,6 +2587,8 @@ Public Class frmNIHauptseite
'Validation muß nicht angepasst werden
_Logger.Debug("Validation Index already set to '" & _value & "'.")
End If
Else
_Logger.Warn($"File_SetBooleanIndex: _Indexname is empty - no index written! (Doc=[{If(_dok IsNot Nothing, _dok.aName, "NULL")}] Value=[{_value}])")
End If
Catch ex As Exception
_Logger.Warn("Error in File_SetBooleanIndex")

View File

@@ -635,7 +635,7 @@ Partial Class frmNIProfileigenschaften
Me.GroupBox1.Size = New System.Drawing.Size(624, 83)
Me.GroupBox1.TabIndex = 70
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Indexname - Nachindexierung fehlerhaft:"
Me.GroupBox1.Text = "Indexname - Nachindexierung/Nachbearbeitung fehlerhaft:"
'
'Label6
'
@@ -701,7 +701,7 @@ Partial Class frmNIProfileigenschaften
Me.GroupBox2.Size = New System.Drawing.Size(624, 83)
Me.GroupBox2.TabIndex = 75
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Dauerhafte Kennzeichnung - Fehler bei Indexierung:"
Me.GroupBox2.Text = "Dauerhafte Kennzeichnung - Fehler bei Nachindexierung/Nachbearbeitung:"
'
'Label8
'

View File

@@ -161,7 +161,7 @@ einen Startindex erhält, der nicht in der Datenbank existiert. Diese Kennzeichn
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK
CQAAAk1TRnQBSQFMAgEBAgEAAdABAAHQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CQAAAk1TRnQBSQFMAgEBAgEAAdgBAAHYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA