User bio
404 bio not found
Member since Nov 9, 2015
Replies:

Hi Otto

Yes that is correct:

Ens.Config.Item.GetSetting() does not account for System Default Settings. It just walks the item's Settings list property

Ens.Config.Item.GetModifiedSetting() does account for System Default Settings.

  • It walks the item's Settings list property for the setting name and if found returns that value.
  • If not found it looks to System Default Settings and if found returns that value.
  • If not found it looks to the class code for any initial value specified for the property with that setting name.

If you set Reply Code Actions to :*=R

Retry Interval to 3600

And Failure Timeout to -1

Once a message is sent to the BO it will lead to the message being resent every hour but in my testing there is the downside that you get an error reported for the BO each time since treated as an error even though the message is resent each retry interval and the response is retrieved:
 

ERROR <Ens>ErrGeneral: Retrying HL7 Message body 8@EnsLib.HL7.Message / 267403 because response 17@EnsLib.HL7.Message / 267405 MSA code 'CA' matched ReplyCodeAction 1 : ':*', resulting in Action code R : MSH|^~\&|EnsembleHL7|ISC|Unity|GlobaSys Partners|202509241126||ACK^A01|20250924F2849|T|2.3.1 MSA|CA|20250924F2849 [doReplyAction+13^Ens.BusinessOperation.1:HL7]

Ens.Director classmethods GetAdapterSettingValue  & GetHostSettingValue could be used - they account for System Default Settings as well. Need to know if the setting is from the Adapter or the Host class (see also GetItemSettingValue that takes Adapter or Host as the type parameter).

set hostitem="SFTPToSomewhere",username=##class(Ens.Config.Credentials).%OpenId(##class(Ens.Director).GetAdapterSettingValue(hostitem,"Credentials",.sc)).Username
write
hostitem="SFTPToSomewhere"
sc=1
username="mlm"

Going off on a tangent one can use the Ens.Setting.Reporter class that is the basis for the Port Authority to find all Credentials in the production:

set reporter=##class(Ens.Setting.Reporter).%New()
set reporter.SettingNamePattern="Credentials"
set reporter.SettingReportClass="Ens.Setting.Report.base"
set sc=reporter.SearchSettings()

The results are in multidimensional property reporter.LocalResults with setting name being lowercase:
LocalResults("MYNAMESPACE","items",1,"categories") = "rest"
LocalResults("MYNAMESPACE","items",1,"credentials") = "JGM"
LocalResults("MYNAMESPACE","items",1,"document") = "primary"
LocalResults("MYNAMESPACE","items",1,"enabled") = 0
LocalResults("MYNAMESPACE","items",1,"itemName") = "EnsLib.REST.GenericOperation"
LocalResults("MYNAMESPACE","items",1,"partner") = ""
LocalResults("MYNAMESPACE","items",2,"categories") = ""
LocalResults("MYNAMESPACE","items",2,"credentials") = "MLM"
LocalResults("MYNAMESPACE","items",2,"document") = "primary"
LocalResults("MYNAMESPACE","items",2,"enabled") = 0
LocalResults("MYNAMESPACE","items",2,"itemName") = "SFTPToSomewhere"
LocalResults("MYNAMESPACE","items",2,"partner") = ""
Certifications & Credly badges:
James has no Certifications & Credly badges yet.
Global Masters badges:
James has no Global Masters badges yet.
Followers:
Following:
James has not followed anybody yet.