01-02-2022 02:58 PM
I’ve just watched your Webinar
I’ve 2 questions for you that came to my mind while watching:
01-02-2022 05:25 PM
Point 1: when you say it cannot be done in HOPEX customizer what you mean ?
In V5 I can change the option directly on the profile;
Point 2 : This is planned to published this REST API. Right now it it schedule for the next major release.
01-02-2022 05:07 PM
Hi Olivier,
Thanks for you answer.
Let me add 2 remarks:
Point 1: indeed, profile options are stored in the systemDb. But we cannot change them through the HOPEX Customizer desktop (we need to use the HOPEX Administration desktop). I Don’t know how to package these changes in this particular case
Point 2: it would be great if we could launch the EasyUpdate through RESTAPI (thus, we could both restart the HAS instance and launch the EasyUpdate through APIs 😊)
01-02-2022 03:14 PM - edited 01-02-2022 03:26 PM
The package module contains two main type of elements :
Point 1 : if i am correct options at profile level are stored within the SystemDb. So you need to use the mechanism to generate the MGR/XMG.
Point 2 :
Parameter to give to the macro
"EnvironmentUpdate=Yes;SqlConversion=Yes;DataConversion=Yes;MetamodelCompilation=Yes"
'MegaContext(External,Fields,Types)
'Uses(Components)
Option Explicit
Function InvokeArgCount()
InvokeArgCount = 1
End Function
Function InvokeOnRoot(mgobjRoot, strOptions)
Dim bEnvironementUpdate : bEnvironementUpdate = 0
Dim bSqlConversion : bSqlConversion = 0
Dim bDataConversion : bDataConversion = 0
Dim bMetamodelCompilation : bMetamodelCompilation = 0
If 0 < Len(strOptions) Then
Dim strOption
For each strOption in split(strOptions, ",")
If 0 < Len(strOption) Then
Dim nOptionTokenIndex : nOptionTokenIndex = 0
Dim strCommandId : strCommandId = ""
Dim strCommandValue : strCommandValue = "No"
Dim strOptionToken
For each strOptionToken in split(strOption, "=")
If 0 = nOptionTokenIndex Then
strCommandId = strOptionToken
End If
If 1 = nOptionTokenIndex Then
strCommandValue = strOptionToken
End If
nOptionTokenIndex = nOptionTokenIndex + 1
Next
If "EnvironmentUpdate" = strCommandId And "Yes" = strCommandValue Then
bEnvironementUpdate = 1
End If
If "SqlConversion" = strCommandId And "Yes" = strCommandValue Then
bSqlConversion = 1
End If
If "DataConversion" = strCommandId And "Yes" = strCommandValue Then
bDataConversion = 1
End If
If "MetamodelCompilation" = strCommandId And "Yes" = strCommandValue Then
bMetamodelCompilation = 1
End If
End If
Next
End If
Dim strFinalResult : strFinalResult = "{"
Dim strJsonSqlConversionAlignIndexResult : strJsonSqlConversionAlignIndexResult = "{}"
Dim strJsonSqlConversionOptimFkResult : strJsonSqlConversionOptimFkResult = "{}"
If 1 = bSqlConversion Then
strJsonSqlConversionAlignIndexResult = mgobjRoot.CallFunction("~OpjjgM(ZQzrR[TechnicalSQLDataConvert]","AlignIndexes")
strJsonSqlConversionOptimFkResult = mgobjRoot.CallFunction("~OpjjgM(ZQzrR[TechnicalSQLDataConvert]","AlignFKOptimizations")
End If
Dim strJsonEnvironementUpdateResult : strJsonEnvironementUpdateResult = "{}"
If 1 = bEnvironementUpdate Then
strJsonEnvironementUpdateResult = mgobjRoot.CallFunction("~j22iGOxJFL71[ImportAutomaticUpdate]")
End If
Dim strJsonDataConversionResult : strJsonDataConversionResult = "{}"
If 1 = bDataConversion Then
strJsonDataConversionResult = mgobjRoot.CallFunction("~n8Zm3OSVQfrG[ConvertAutomaticUpdateMethod]", "", "")
End If
Dim strJsonMetamodelCompilationResult : strJsonMetamodelCompilationResult = "{}"
If 1 = bMetamodelCompilation Then
Dim ulCompileMM : ulCompileMM = 1
Dim ulCompileTD : ulCompileTD = 1
Dim ulCompileP : ulCompileP = 1
Dim ulRemoveOldCompilationResults : ulRemoveOldCompilationResults = 1
Dim ulSaveCompilationResults : ulSaveCompilationResults = 1
strJsonMetamodelCompilationResult = mgobjRoot.CallFunction("~91tmJFSUQL6I[MetaControl]", ulCompileMM, ulCompileTD, ulCompileP, ulRemoveOldCompilationResults, ulSaveCompilationResults)
End If
If 1 = bEnvironementUpdate Then
strFinalResult = strFinalResult & " ""EnvironmentUpdate"" : " & strJsonEnvironementUpdateResult
End If
If 1 = bSqlConversion Then
If 1 < Len(strFinalResult) Then
strFinalResult = strFinalResult & ","
End If
strFinalResult = strFinalResult & " ""IndexesAlignment"" : " & strJsonSqlConversionAlignIndexResult & "," & " ""FKOptimizations"" : " & strJsonSqlConversionOptimFkResult
End If
If 1 = bDataConversion Then
If 1 < Len(strFinalResult) Then
strFinalResult = strFinalResult & ","
End If
strFinalResult = strFinalResult & " ""DataConversion"" : " & strJsonDataConversionResult
End If
If 1 = bMetamodelCompilation Then
If 1 < Len(strFinalResult) Then
strFinalResult = strFinalResult & ","
End If
strFinalResult = strFinalResult & " ""MetamodelCompilation"" : " & strJsonMetamodelCompilationResult
End If
strFinalResult = strFinalResult & "}"
InvokeOnRoot = strFinalResult
End Function