· Jan 15, 2018

In Business Operation Getting Business Service Settting

In a Business Process using the  %PrimaryRequestHeader I can call  GetAdapterSettingValue and get the setting from a Business Service. But once I am in the  Business Operation there is no class for  %PrimaryRequestHeader. Is there another way to get setting in the Business Operation that was define in the Business Service  ?​

Set tSrcCfg = ..%PrimaryRequestHeader.SourceConfigName
If tSrcCfg '= ""
  Set tCfgVal = ##class(Ens.Director).GetAdapterSettingValue(tSrcCfg, "OutboundFilePath", .tSC)
  $$$LOGINFO(tSrcCfg _ ", Outbound FilePath: " _ tCfgVal)
  s tPath = tCfgVal
Discussion (3)0
Log in or sign up to continue

Well, yes, it returns the sender of the message. If you're sending message from BS to BO directly sender would be BS. If you're sending BS-BP-BO, for BO the sender would be BP because it is.

If you want to get BS from BO in BS-BP-BO you can implement it via several approaches:

  1. Add this info to BP-BO message.
  2. You have BP-BO header, use it, SessionId and BusinessProcessId to locate  BS-BP header in the header table.
  3. If you have unique identifier for BP-BO message and you know it in BS you can store this information during BS processing (to a temp holder class) and then retrieve it from BO by the identifier.


I'd like to add that second approach without careful planning and optimizing may negatively impact performance  if stored messages are in millions. Starting new SessionId for each new message sent from BS may help. (because BS MessageId would then be equal to SessionId in BO).