Written by

Question Jack Winn · Sep 28, 2023

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 %StringpItem 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) = ""

}

}

Product version: Caché 2017.1

Comments

Luis Angel Pérez Ramos · Sep 28, 2023

Well, I guess that you just need to call the BO/endpoint form the WHILE loop:

Set tSC = ..SendRequestSync(outbound, pRequest, .pResponse)
0
Eduard Lebedyuk · Oct 2, 2023

If you log $lts(OutBoundlist) do you see the expected list?

0