Get SourceConfigName and TargetConfigName in a BPL

Primary tabs

We need to get service's both source and target names. We have checked that we could obtain them in the service:

set ^sourceName = ..#SERVICENAME

However we would like to get it directly from the BPL. We have tried:

Set SourceConfigName = ..%PrimaryRequestHeader.SourceConfigName
  $$$LOGINFO("SourceConfigName "_SourceConfigName)

 

And the compiler outputs:

ERROR: Procesos.HistoriaClinica.ConsultaDatosHCEPaciente.Thread1.cls(S161+247) : MPP5376 : Method or Property '%PrimaryRequestHeader' does not exist in this class.

 

How could we access to %PrimaryRequestHeader property inside Ens.BusinessProcess class which is extended by Ens.BusinessProcessBPL, get the Ens.MessageHeader and then obtain its SourceConfigName and TargetConfigName?

 

Replies

Hi,

Try using ..%Process to access the actual business process instance (BPL).

Set SourceConfigName = ..%Process.%PrimaryRequestHeader.SourceConfigName 

In most cases just process special variable should be enough:

Set SourceConfigName = process.%PrimaryRequestHeader.SourceConfigName