Written by

Question Yone Moreno · Mar 5, 2020

Get SourceConfigName and TargetConfigName in a BPL

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?

Comments

Alberto Fuentes · Mar 5, 2020

Hi,

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

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

0
Eduard Lebedyuk  Mar 5, 2020 to Alberto Fuentes

In most cases just process special variable should be enough:

Set SourceConfigName = process.%PrimaryRequestHeader.SourceConfigName  
0