Dynamic Rendered Connections
Hi,
I'm trying to configure a specific process which dynamically sends messages to different endpoints based on datalookup keys, I've configured this aspect. What I'd like is to be able to visually see these connections without hardcoding them so is there a way to dynamically link them, i'll share what I tried below.
Thanks.
ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
{
//Set pArray(..#endpoint)
DO pItem.PopulateModifiedSettings()
&SQL(SELECT %DLIST(KeyName)
INTO :OutBoundlist
FROM Ens_Util.LookupTable
WHERE TableName = 'BusinessLookup'
)
SET list = $Listbuild("ADT","ADT")
SET listOfEndpoints = OutBoundlist
SET listEndpointLength = $LISTLENGTH(listofEndpoint)
SET ptr=0,count=0
WHILE $LISTNEXT(OutBoundlist ,ptr,value)
{
SET count=count + 1
// SET ..TargetConfigName = $SELECT($DATA(value): value)
SET outbound = $SELECT($DATA(value): value)
SET pArray(outbound) = ""
}
}
Comments
Well, I guess that you just need to call the BO/endpoint form the WHILE loop:
Set tSC = ..SendRequestSync(outbound, pRequest, .pResponse)If you log $lts(OutBoundlist) do you see the expected list?