Support un-initiated settings
This util helps to init InterSystems Interoperability production with certain values. It can let you init the value for a given production, production item (business service, operation, etc) and a given setting.
Sometimes we need to init the production before start. It could be different API keys, secrets, tokens, etc.
This utility will help to simplify the process.
zpm "install production-settings"
Consider you have a production where you want to change the port for the HTTP Inbound Service. This is the line you can use:
do ##class(shvarov.i14y.Settings).SetValue("ProductionName","ServiceOrOperationName","Setting",Value)
For example:
do ##class(shvarov.i14y.Settings).SetValue("Test.shvarov.i14y.TestProduction","InboundService","Port",8888)
Similar if you want to obtain the current setting from the production element you can use:
w ##class(shvarov.i14y.Settings).GetValue("Test.shvarov.i14y.TestProduction","InboundService","Port")
The utility works only for the settings that were preinitialized in the production. E.g. in the production below the setting Port could be altered:
<Production Name="Test.shvarov.i14y.TestProduction" LogGeneralTraceEvents="false"> <Description></Description> <ActorPoolSize>2</ActorPoolSize> <Item Name="InboundService" Category="" ClassName="EnsLib.HTTP.GenericService" PoolSize="1" Enabled="false" Foreground="false" Comment="" LogTraceEvents="false" Schedule=""> <Setting Target="Adapter" Name="Port">2222</Setting> </Item> </Production>