During a period when messages are processing slowly, can you check the queues page (Ensemble >> Monitor >> Queues) and see if there are messages waiting to be processed?

The next step would be to collect some pButtons data to see if there's a performance bottleneck on the system:
https://community.intersystems.com/post/intersystems-data-platforms-and-...

Even before running the pButtons it would be worth doing a quick check in the OS to see which processes (Ensemble and non-Ensemble processes) are using the most CPU and RAM.

This is typically handled by data lookup tables. Lookup table entries can be maintained through a provided GUI, imported from files or through custom code:
https://docs.intersystems.com/healthconnectlatest/csp/docbook/DocBook.UI...

DTL includes pre-built functions for looking up values in a lookup table:
https://docs.intersystems.com/healthconnectlatest/csp/docbook/Doc.View.c...

Hi Adam,

I'm not familiar with XLT, so I don't have any examples of converting XLT to DTL.

Here's some more information on executing XSLT transformations from a BPL:
https://docs.intersystems.com/healthconnectlatest/csp/docbook/DocBook.UI...

Or you can execute an XSLT transformation directly from COS:
https://docs.intersystems.com/healthconnectlatest/csp/docbook/Doc.View.c...

You're missing one step. The SDA your DTL is producing is in the form of an XML vDOC (EnsLib.EDI.XML.Document) which is using the SDA schema. The SDA3.InboundProcess needs to receive an HS.Message.ECRUpdateRequest with the raw XML for the SDA stored in its contentstream property. To fix this, you can create a second DTL which takes the EnsLib.EDI.XML.Document as input and outputs an ECRUpdateRequest. In the DTL you'll just need to call the VDoc's method to generate the XML stream and then set ECRUpdateRequest.ContentStream to that stream.

This is absolutely possible. First, you'll want to use a SQL Business Operation rather than a Business Service. Your function will send a simple request message to the Business Operation containing any parameters you want to pass to the SP (if you only have one parameter you can use Ens.StringContainer). The Operation will execute the SP on SQL Server and return a response message to your function.

You didn't mention where you plan to call this function from (a DTL? a Business Process?). If it's a Business Process then you don't need a custom function, you can just use a "call" action to send the request to the Operation.

If you need to do this from a DTL, then in order to send a message to the Operation you'll need to call a method of the business process or router. You can get a reference to the process/router this way:

set bp=%Ensemble("%Process")

And then you can send your request message like this:

set tSC=bp.SendRequestSync("My.SQLServer.Business.Operation",req,.resp)