· Apr 21 1m read

Dynamic <call> target in BPL

Hi all,

When making a Business Process reusable, I needed to make the target of a <call> configurable as a business host setting. This can be done through indirection. Here's how:

Property TargetConfigName As Ens.DataType.ConfigName;Parameter

SETTINGS = "TargetConfigName:Basic";

/// BPL Definition
XData BPL [ XMLNamespace = "]
<process language='objectscript' request='Ens.Request' response='Ens.Response' height='2000' width='2000' >
<sequence xend='200' yend='450' >
<call name='Call configurable target' target='@process.TargetConfigName' async='1' xpos='200' ypos='250' >
<request type='Ens.Request>
<assign property="callrequestvalue="requestaction="set" />
<response type='Ens.Response>
<assign property="responsevalue="callresponseaction="set" />
<sync name='Wait' calls='Call configurable target' type='all' xpos='200' ypos='350' />
Discussion (5)3
Log in or sign up to continue

Hi @Otto Medin 
very good point.

In order to get links visible on the production configuration, you can add this method :

/// Return an array of connections for drawing lines on the config diagram
ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
	Do ##super(.pArray,pItem)
	If pItem.GetModifiedSetting("TargetConfigNames",.tValue) {
		For i=1:1:$L(tValue,",") { Set tOne=$ZStrip($P(tValue,",",i),"<>W")  Continue:""=tOne  Set pArray(tOne)="" }