How to show connections in Production Configuration screen for HL7 Router
Hello, I created HL7 router Extends Ens.Rule.Definition. When I click the dot to the left, it does not draw lines to targets. I tried to add ClassMethod OnGetConnections(), but it does not get executed.
Product version: IRIS 2022.3
OnGetConnections() should return an array in the first (Output) argument, indexed by the names of the target process(es) and/or operation(s). The second argument is the production item object passed by the invocation of the method from the web ui.
Here's an example that scans the business process settings for any setting that ends with "ConfigName" or "ConfigNames" and sets the pArray argument appropriately:
ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item) { #dim tSetting As Ens.Config.Setting Do ##super(.pArray,pItem) For l=1:1:pItem.Settings.Count() { Set tSetting = pItem.Settings.GetAt(l) If ($LOCATE(tSetting.Name,"ConfigNames?$") && pItem.GetModifiedSetting(tSetting.Name,.tValue)) { For i=1:1:$L(tValue,",") { Set tOne=$ZStrip($P(tValue,",",i),"<>W") Continue:""=tOne Set pArray(tOne)="" } } } }
Adjust the match string in the $LOCATE() function if you're using custom setting name(s) for the target(s).