I don't think there is a rule or the "right" way of doing it.

Personally I use Routing Rules only for HL7, for other Business Processes I never (ever!) use BPL and always use code.

In some case when something cannot be done in Rules I use code even for HL7.

Other people have different habits and/or opinions 😁

I'm using EnsLib.DICOM.Process to route incoming images to different PACS destinations

That's the correct way of doing it, so...do it! 🙂

Hopefully you have a well defined, finite number of PACS destinations, you need to define a Business Operation for each destination and use the Business Process to route the message to the correct Business Operation depending on the destination.

Then follow the last linked post by the Ask DC AI bot, if you still have problems explain what you are doing and the issue you encounter.

Regarding the Status property I'm a bit confused, you say "instead of returning 200 for example". Apart from the name "Status" what kind of data you need to store in the property? It looks like you want to store a string (an HTTP status?), so a %String datatype is appropriate.

Please note that %Status is a specific datatype to hold a status as returned by many (most?) of the IRIS methods or created using macros or methods, you cannot store "200" in a %Status property.

Now to the stream, a properly handled/valued stream of type %Stream.GlobalCharacter IS properly displayed in the visual trace content, I've used and still used it all the times and it just works, it's properly displayed in the trace.
If that's not the case for you, then I suspect you are not setting your property correctly with a stream, if you share the code part where you set the stream property then we could understand what's wrong.

Frankly, I don't understand what you are actually asking, can you please provide some more detail and context?

How are you currently sending the email now?

Using a BO with EnsLib.EMail.OutboundAdapter?

Using %Net.SMTP class directly in your code?

Or?

The command that closes the Lite Terminal when issued in IRIS for Linux is:

Close 0

The same command does not close the Lite Terminal in IRIS for Windows.

Why ⁉️

I tested it in my PC and it worked, so I was (almost 🙃) going to respond....

Before posting I tested again connecting to a Linux server and....I was able to reproduce the issue reported.

So, connecting Lite Terminal to a Windows IRIS instance %G works fine, when connected to a Linux instance then Lite Terminal closes when exiting %G.

Interesting, isn't it? 😊

Nice Tips & Tricks list! 🙂
Very useful.

Regarding #10 "Converting JSON array (%DynamicArray) to a comma-separated string and back:"

USER>Set jsonArray = ["test1","test2","test3"] 
  
USER>Set str = $TRANSLATE(jsonArray.%ToJSON(), "[]") 
  
USER>w str 
"test1","test2","test3"

The returned is not really what I consider a "comma separated string".
To return my definition of "comma separated string" it would be:

USER>Set str = $TRANSLATE(jsonArray.%ToJSON(), """[]") 
  
USER>w str 
test1,test2,test3

Then, going back...it's another story 😉

Regarding #2 "Error check when we use Embedded SQL (&sql())"

In addition to error code and description it's often useful to get/include error details, like:

Return:SQLCODE<0 $$$ERROR($$$GeneralError, $$$FormatText("Operation failed. SQLCODE = %1: %2 (%3)", SQLCODE, $SYSTEM.SQL.Functions.SQLCODE(SQLCODE),%msg))

For example, if you instruct it to extract data where a column value equals “Support,” it may generate a condition like = 'Support' in the SQL query.

However, since the actual returned value is “SUPPORT,” the condition does not match.

Not really, when using the default %String collation (SQLUPPER) the SQL "=" condition is case insensitive, for example:

WHERE name = 'Enrico'
WHERE name = 'ENRICO'
WHERE name = 'enrico'

All match the record/row with my name regardless of the case is stored in the table.

If collation is changed to SQLSTRING, then only exact case will match the condition.

$$$ThrowOnError(##class(Ens.BusinessService).SendRequestAsync(tServiceConfigName, tRequest))

SendRequestAsync() is an instance method, not a class method, how can this line possibly work?

You are not supposed to call OnProcessInput() method.

You need to IMPLEMENT OnProcessInput() and call ProcessInput().

Meet so many old friends, colleagues and new people that share the same interests and passion for InterSystems Technology!

It's not easy but you may find ways to narrow the origin.

One possibility is to check the journal file entry where the corresponding global node of the HL7 Message
To identify what journal file to check/search look for a non empty HL/ message this ID cose to the empty orphaned message and find the date/time it was created.


HL7 messages (not segments) are stored in ^EnsLib.H.MessageD(MessageID).
Find in the journal file the entry of the creation of the empty orphaned message, it contains the process id ($job) that created the message and exact date-time of creation.

The process id may be used to point what Business Host (BS, BP or BO) created the message.

Then I'd look for the trace of messages sent/received by that Business Host "around the time" the empty message was created.

All this is possible and relatively easy if the empty orphaned message is relatively new (the newer the better), if old, then you may not have the journal file and/or the job that created it may not be still running (restart production or host, etc.).

Where else you can get in touch with so many IRIS delevopers, including InterSystems products developers?

If you need " official recommendation" you should contact InterSystems WRC, this is a Developer Community.

What type of ResultSet? Can you please provide the exact class name of the ResultSet you use?

To get it working using DBeaver Community 25.3.5 I had to put the SSLConfig.properties file in C:\Program Files\DBeaver and then it works!

Thank you @Benjamin De Boe 🙂

One option could be:

Set last=$o(^A(""),-1)

Set ^A(last_"z")="new last value"

In fact you can concatenate anything, not necessarily a "z"..

If the first subscript is always numeric, then:

Set last=$o(^A(""),-1)

Set ^A(last+1)="new last value"

The first parameter is a $list, try with:

do ##class(%SYS.TaskSuper).ExportTasks($lb(1022,1023),"/opt/contenedor/tasks.xml")

Note that the documentation for the ExportTasks() method you linked in your post says:
List of task IDs to export $lb(1,2,3)