This commit is contained in:
2019-11-29 14:35:20 +01:00
parent 7e541a8013
commit 2c5f1e4aea
49 changed files with 9759 additions and 3658 deletions

View File

@@ -53,13 +53,13 @@ Public Class clsPatterns
Public Shared Function ReplaceAllValues(input As String, panel As Panel, document As WMObject, prename As Object, surname As Object, shortname As Object, email As Object, userId As Object, profileId As Object) As String
Try
Dim result = input
LOGGER.Debug($"ReplaceString BEFORE replacing: [{result}]")
result = ReplaceInternalValues(result)
result = ReplaceControlValues(result, panel)
If Not IsNothing(document) Then result = ReplaceWindreamIndicies(result, document)
result = ReplaceIDBAttributes(result)
result = ReplaceUserValues(result, prename, surname, shortname, email, userId, profileId)
LOGGER.Debug($"ReplaceString AFTER replacing: [{result}]")
Return result
Catch ex As Exception
LOGGER.Error(ex)
@@ -196,13 +196,18 @@ Public Class clsPatterns
Dim oIDBValue
If indexName = "ObjectID" Then
oIDBValue = CURRENT_DOC_ID
ElseIf indexName = "OBJID" Then
oIDBValue = CURRENT_DOC_ID
ElseIf indexName = "DocID" Then
oIDBValue = CURRENT_DOC_ID
Else
oIDBValue = IDBData.GetVariableValue(indexName)
End If
If IsNothing(oIDBValue) And oTryCounter = MAX_TRY_COUNT Then
LOGGER.Warn("Exit from ReplaceWindreamIndicies as oWMValue is still nothing and oTryCounter is 500!")
Throw New Exception("Max tries in ReplaceWindreamIndicies exceeded.")
LOGGER.Warn("Exit from ReplaceIDBIndicies as Value is still nothing and oTryCounter is 500!")
Throw New Exception("Max tries in ReplaceIDBAttributes exceeded.")
End If
If oIDBValue IsNot Nothing Then
@@ -214,7 +219,7 @@ Public Class clsPatterns
Return result
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Info("Error in ReplaceWindreamIndicies:" & ex.Message)
LOGGER.Info("Error in ReplaceIDBAttributes:" & ex.Message)
End Try
End Function