#Business Operation

4 Followers · 262 Posts

InterSystems Ensemble provides specialized business operation classes that use specific outbound adapters to communicate with external systems and UI.

Documentation.

Article Robert Hurst · Feb 3, 2021 3m read

We use the Caché JDBC Gateway to Oracle and SQL servers to directly invoke their stored procedures from Ensemble. Getting quick, inline data results back are typically handled within the Functions.Library class as a function to wrap the query and format the return appropriately.

But what about more elaborate stored procedures made for posting data without log-jamming a Router?  The operations to construct those data pipelines can get tedious, especially when changes are needed.  What follows is a code generator to make a new Ensemble Message class from a SQL Stored Procedure that is compatible

2
2 835
Question joseph caroè · Feb 11

Hello everyone. I'm currently working on how to implement a solution that makes it possible to include within the response of a BusinessOperation the "RetryCount" for each message.
For Example, we have this message that was retried twice:

This is an HL7.message going through a specific business operation, we did not create a custom one: we used the default implementation EnsLib.HL7.Operation.TCPOperation. This operation should automatically handle retries (infinetely waiting on a response). I found out each Business Operation has this property :

Can we retrieve this information AFTER the message

1
0 35
Question Robert Hildebrand · Feb 5

Hi,

I want to consume an API that provides HL7 messages. To achieve this, I have thought of the following workflow:

I have created a business service that periodically triggers a business process. The trigger request is forwarded to a business operation. There, a %Net.HttpRequest is assembled from scratch and then sent to the API endpoint. The corresponding HttpResponse then contains several HL7 messages encoded in UTF-8 in the message body. To further process the HL7 messages, the operation sends the HttpResponse back to the business process as EnsLib.HTTP.GenericMessage.

The raw data looks

3
0 61
Question Hassan Mirza · Jan 22

Hi, I have simple email alert setup (EnsLib.EMail.AlertOperation) where in operations I have SMTP server setup and Recipients emails.

Also I find Alert Groups dropdown option in operations, processes, how this is different from setting up simple email alert with recipients list?

Please advise.

1
0 38
Question Hassan Mirza · Jan 15

Needs some help with FHIR return code 200 or 201 when processing HL7 messages in HealthConnect.

Issue:

1. If FHIR code is 200 or 201, HealthConnect keep processing HL7 messages

2. If FHIR code is NOT 200 or 201, HealthConnect keep suspend the HL7 messages in the messages queue, then keep processing NEXT subsequent HL7 messages in the TEXT file if the FHIR code is 200 or 201

3. I am also using following "Reply Code Actions" in Operation settings (:?R=S,:?E=S,:~=S,:?A=C,:*=S,:I?=W,:T?=C)

Please advice if I have a "if condition check" for FHIR codes 200 or 201, what "Reply Code Actions" I should use?

5
0 87
Question Scott Roth · Aug 20, 2025

Using a WSDL and the SOAP wizard I created a WebServiceClient, and Operation to send an encoded message to a Vendor. But the vendor is now sending back an HL7 in the SOAP response.

I tried updating the Operation to Extend EnsLib.HL7.Operation.ReplyStandard, but still use the EnsLib.SOAP.OutboundAdapter. When I did this it broke my Operation and would not compile with the following error...

ERROR #5478: Keyword signature error in osuwmc.Nutrition.HL7SoapOperation:Method:SendMessage, keyword 'method argument/s signature' must be 'EnsLib.HL7.Message,EnsLib.HL7.Message,%Library.String' or its

1
0 98
Question Hassan Mirza · Nov 13, 2025

Working on interfaces, trying to add simple email alert (link below) under "Operations"

https://docs.intersystems.com/healthconnect20231/csp/docbook/DocBook.UI…

if the message is good,  health connect processes ok.

if the message has an ERROR, it held up the message in Queue (keep retrying), then subsequent messages held up in the queue as well to be processed. Because of the message held up in Queue, Operation for TCP connection also turning blue.

Please advice.

3
0 133
Article Muhammad Waseem · Nov 20, 2025 13m read

Hi Community,

In the first part of this series, we examined the fundamentals of Interoperability on Python (IoP), specifically how it enables us to construct such interoperability elements as business services, processes, and operations using pure Python.

Now, we are ready to take things a step further. Real-world integration scenarios extend beyond simple message handoffs.They involve scheduled polling, custom message structures, decision logic, filtering, and configuration handling.In this article, we will delve into these more advanced IoP capabilities and demonstrate how to create and run a more complex interoperability flow using only Python.

To make it practical, we will build a comprehensive example: The Reddit Post Analyzer Production. The concept is straightforward: continuously retrieving the latest submissions from a chosen subreddit, filtering them based on popularity, adding extra tags to them, and sending them off for storage or further analysis.

The ultimate goal here is a reliable, self-running data ingestion pipeline. All major parts (the Business Service, Business Process, and Business Operation) are implemented in Python, showcasing how to use IoP as a Python-first integration methodology.

2
1 235
Article Yuri Marx · Nov 18, 2025 11m read

Modern data architectures utilize real-time data capture, transformation, movement, and loading solutions to build data lakes, analytical warehouses, and big data repositories. It enables the analysis of data from various sources without impacting the operations that use them. To achieve this, establishing a continuous, scalable, elastic, and robust data flow is essential. The most prevalent method for that is through the CDC (Change Data Capture)  technique. CDC monitors for small data set production, automatically captures this data, and delivers it to one or more recipients, including analytical data repositories. The major benefit is the elimination of the D+1 delay in analysis, as data is detected at the source as soon as it is produced, and later is replicated to the destination.

This article will demonstrate the two most common data sources for CDC scenarios, both as a source and a destination. For the data source (origin), we will explore the CDC in SQL databases and CSV files. For the data destination, we will use a columnar database (a typical high-performance analytical database scenario) and a Kafka topic (a standard approach for streaming data to the cloud and/or to multiple real-time data consumers).

Overview

This article will provide a sample for the following interoperability scenario:

 

0
4 214
Question Robert Hildebrand · Oct 30, 2025

Hello,
I am currently facing the task of retrieving or sending HL7 messages from a web API. Since we only send HL7 messages via internal sockets, web APIs are relatively new to me.
The following is my plan for the new interface:
I have created a new custom business service that periodically sends requests to a business process.In this business process, the HTTP request (HTTP.GenericMessage) is then created from scratch.The special feature is the "Authorisation" header field, where a signature is inserted, which consists of a base64-encoded hash value.

4
0 117
Question Mark OReilly · Oct 27, 2025

We are trying to mark a hl7 nack as "completed" to ignore an error and not generate the alert. 

We can remove from adding a managed alert or add another router in 

When Nack of CR of 

Date of birth in PID.7 must not be empty

We tried via this but i think it's only for an actual IRIS alert errror not the HL7 error code/description 

E*Date of birth in PID.7 must not be empty=C,:?CR=C,:?R=RF,:?E=S,:~=S,:?A=C,:*=S,:I?=W,:T?=C

3
0 86
Question Saju Abraham · Sep 24, 2025

Our vendor is developing an interface API on their end to capture HL7 data on a Server Port, and they require us to send a pre-defined HL7 Order message for testing every hour until the API is completely operational.

Is it possible to accomplish that in a Business Operation automatically without utilizing a service or process? The BO is a standard TCP/IP connection.

I'm manually sending the message again from the Operations right now. I do not have access to the System Operation to use the Task Manager feature.

3
0 102
Question Scott Roth · Sep 8, 2025

We currently have Business Operation that we built to use the EnsLib.SQL.OutboundAdapter so we can make Microsoft SQL Server Stored Procedure calls. The BO is attached to a Java Gateway Service.

Some of our MS SQL Databases have moved from being OnPrem to Azure Cloud. We have started seeing where we are receiving errors on the BO saying that we cannot connect to the Azure Database, but we never receive a Disconnect from the Azure Database.

Once this happens it seems that the Java Gateway still thinks the connection is opened, and we have to Stop/Start the Java Gateway to get the connection to

2
0 76
Article Muhammad Waseem · Aug 18, 2025 7m read

Interoperability on Python (IoP) is a proof-of-concept project designed to showcase the power of the InterSystems IRIS Interoperability Framework when combined with a Python-first approach.IoP leverages Embedded Python (a feature of InterSystems IRIS) to enable developers to write interoperability components in Python, which can seamlessly integrate with the robust IRIS platform. This guide has been crafted for beginners and provides a comprehensive introduction to IoP, its setup, and practical steps to create your first interoperability component. By the end of this article, you will get a clear understanding of how to use IoP to build scalable, Python-based interoperability solutions.

6
5 465
Article Nikolay Solovyev · Jul 29, 2025 3m read

Sending emails is a common requirement in integration scenarios — whether for client reminders, automatic reports, or transaction confirmations. Static messages quickly become hard to maintain and personalize. This is where the templated_email module comes in, combining InterSystems IRIS Interoperability with the power of Jinja2 templates.

Why Jinja2 for Emails

Jinja2 is a popular templating engine from the Python ecosystem that enables fully dynamic content generation. It supports:

  • Variables — inject dynamic data from integration messages or external sources
  • Conditions (if/else) — change the
0
0 105
Question Scott Roth · Jun 10, 2025

We have a vendor that is requiring that the HL7 sent to them is sent as an Encoded message inside a SOAP request but is sending back an HL7 message as the response. 

When the WSDL built the response, it was expecting an encoded message back. I updated the Request and Business Operation to expect an EnsLib.HL7.Message, however I am not sure how to handle the HL7 ACK to post it back to the sending message so it will not cause an Orphan message, and to parse it back correctly in the trace viewer.

When I do a $$$LOGINFO on the pResponse, I get back...

How do I properly

1
0 118
Question Scott Roth · Jun 6, 2025

I am having issues trying to send SOAP requests to a Cloud Based AWS Application that lives outside of our network. 

It is using a Basic Authentication, Key, Certificate Authority and Whitelist for Security. 

If I attempt the connection using wget from the command line I am able to connect,

:>wget --bind-address=10.95.129.245 --server-response https://xxxxxxxxxx/xxxxxxx/services/Mirth
--2025-06-06 15:54:51--  https://xxxxxxx/xxxxxxxx/services/Mirth
wget: /ensemble/.netrc:16: unknown token xxxxxxx
wget: /ensemble/.netrc:16: unknown token xxxxxxxx
Resolving xxxxxxx.com (xxxxxxx)...

3
0 144
Question Scott Roth · Jun 11, 2025

I am having a hard time trying to figure out the following...

Within a DTC, I was able to take the a EnsLib.HL7.Message source and using

set a= $System.Encryption.Base64Encode(source.RawContent)
set encodedMessage=$Get(a)

to take the HL7 message encode it and add it to the Data Class as a string to be sent to an Operation to be sent out as a SOAP Request. 

However to make it more universal I tried doing this within a copy of EnsLib.HL7.SOAPOperation

Method SendMessage(pMsgOut As EnsLib.HL7.Message, Output pMsgIn As EnsLib.HL7.Message, pExpectedSequenceNumber As%String) As%Status
{
 Set tSource
3
0 121
Article Guillaume Rongier · Apr 9, 2019 3m read

IRIS and Ensemble are designed to act as an ESB/EAI. This mean they are build to process lots of small messages.

But some times, in real life we have to use them as ETL. The down side is not that they can't do so, but it can take a long time to process millions of row at once.

To improve performance, I have created a new SQLOutboundAdaptor who only works with JDBC.

BatchSqlOutboundAdapter

Extend EnsLib.SQL.OutboundAdapter to add batch batch and fetch support on JDBC connection.

Benchmark

Benchmarks released on Postgres 11.2 with 1 000 000 rows fetched and 100 000 rows inserted on 2 columns.

alt text

Prerequis

10
3 1922
Article Henry Pereira · May 29, 2025 6m read

image

You know that feeling when you get your blood test results and it all looks like Greek? That's the problem FHIRInsight is here to solve. It started with the idea that medical data shouldn't be scary or confusing – it should be something we can all use. Blood tests are incredibly common for checking our health, but let's be honest, understanding them is tough for most folks, and sometimes even for medical staff who don't specialize in lab work. FHIRInsight wants to make that whole process easier and the information more actionable.

FHIRInsight logo

🤖 Why We Built FHIRInsight

It all started with a simple but

2
0 200
Question Ryan Hulslander · May 21, 2025

WSDL for a CDC vendor was provided with a URL using a custom socket (non 443). Everything generated fine, but when making calls to their https:// URL that has their custom port in the URL - no response comes back. The assumption is, their server isn't even processing the request, as Postman does using the custom https://path.to.server:NNNN port in the URL.

I see with a normal web operation that uses %Net.HttpRequest overriding the port property is easily done - but no animal seems to exist for any generated SOAP Operation class.

3
0 157
Article Kurro Lopez · Mar 3, 2024 5m read

Hi community,

The aim of this article is to explain how to create messaging between IRIS and Microsoft Teams.

In my company, we wanted to monitor error messages, and we used the Ens.Alert class to redirect those error messages through a Business Operation that sent an email.
The problem was that we sent those error messages to a support account where there were many emails. We wanted something specific for a specific team.

So we investigated how to make these messages reach the development team directly and they could have, in real time, a notification of an error in our production.
In our company we use Microsoft Teams as a corporate tool, so we asked ourselves: How could we make these messages reach the IRIS development team?

15
8 967
Article Keren Skubach · May 2, 2025 3m read

One of the challenges of creating a DICOM message is how to implement putting data in the correct place. Part of it is by inserting the data in the specific DICOM tags, while the other is to insert binary data such as a picture - In this article I will explain both.

To create a DICOM message, you can either use the  EnsLib.DICOM.File class (to create a DICOM file) or the  EnsLib.DICOM.Document class (to create a message that can be sent to PACS directly). In either case, the SetValueAt method will allow you to add your data to the DICOM tags.

A DICOM message consists of two constituent parts, Co

0
0 347
Question Martin Browne · Apr 24, 2025

Hi,

We're having an issue with some messages being sent to a downstream system from Healthshare.  Part of the free text in the NTE segment is displaying with special characters on the system front-end but is not present in the HL7 message that we send to them.  We are guessing that this is a result of some of the text being copied and pasted from something like MS Word. The '?' on their system is just representing an invalid character. 

Is anyone aware of a way to prevent this occurring? We are sending the messages using the 'cp1252' encoding.

Sent from us to system

What displays on the system

2
1 131
Question Scott Roth · Apr 2, 2025

Trying to start investigating an error we are seeing with multiple of the same messages getting sent to the same vendor. We receive an HL7 message with an RTF embedded from our EMR, send it through a DTL to just update the Patient Class, and then send it onto the Operation which is TCP.

We are starting to see this error message...

ERROR <Ens>ErrBPTerminated: Terminating BP DocOutRptRouting3M360 # due to error: ERROR <Ens>ErrException: <INVALID OREF>zOutputToIOStream+6^EnsLib.HL7.Message.1 -- logged as '-' number - @''
> ERROR <Ens>ErrException: <INVALID

4
0 129
Question Will · Mar 16, 2025

Hi,

My HL7 interface in production is outputting messages to a HL7 File Operation and a  EnsLib.HL7.Operation.HTTPOperation. There is no errors in the File Operation, but the HL7 HTTPOperation is giving ERROR #5911: Character Set 'iso-8859-4' not installed, unable to perform character set translation.  Both the HL7 File Operation and HL7 HTTP Operation are using latin1 for Default Char Encoding.

What is ERROR #5911 aboutIs something missing in the IRIS installation? 

Thank you.

W

5
0 124
Question Colin Brough · Mar 10, 2025

We are calling a REST web-service from Ensemble using EnsLib.HTTP.OutboundAdapter and redefining the adapter class to set custom headers as described by @Eduard Lebedyuk here: How to set Content-Type

During development we accidentally stumbled across puzzling behaviour - we now suspect that the %Net.HttpRequest object created in the linked example is being reused in the following scenario:

  1. request is created as described and sent to web-service, so an instance of a %Net.HttpRequest object exists and is known to the EnsLib.HTTP.OutboundAdapter
  2. we modify our code to test what happens if
2
0 151