I have a case where I need to look up the NPI provider against an External MS SQL database to retrieve our Provider Identifier to send to a downstream system. In the past I would use a Business Process (BPL) to connect to the outside MS SQL via JDBC and get that information for me. But I was thinking instead of creating a BPL process to do this, would it be better just to link to the outside MS SQL database table to retrieve the information in a SQL statement within a DTL?

0 3
0 187

New to Health Connect so please forgive me if this is a stupid question! Is there a specific error code returned when a user initiates an abort from the jobs tab of the business host? I want to be able to treat the Abort as Completed due to our complex business process. Currently, hitting abort just retries the message to the same business operation. Want I want to do is provide the error code used by the Abort (if there is one) and treat it as OK

Thanks in advance.

0 4
0 175
Scott Underwood · Mar 31, 2017
Atelier BPL editor

Is there a way to graphically edit BPL processes, or do we still need to use Studio for doing that? 


Looking at the documentation, it appear there should be an Atelier BPL editor option available under Open With, but all I have is Atelier Class, HTML, INT, and MAC editors. 


There is a BPL editor in the list, but it throws a "Bad editor input" error when trying to open the class file. 


0 9
1 966

We are trying to convert some of our SQL Service Integration Service jobs from Visual Studio to Ensemble. If we execute a Stored Procedure within SQL Server Management Studio it is returning approx 12,000 rows. However when Ensemble executes the same Stored Procedure it is only returning 250 rows.

Is there a limitation to EnsLib.SQL.Snapshot?

This is how we are calling the Stored procedure

0 4
0 602

I created a custom class for a process that does some basic manipulation to an HL7 message. I'd like to be able to write some debugging to the process event log. How would I do that?

I've tried ##class(Ens.Util.Trace).WriteTrace("system","HOSP.IHE.PDQProcess","MessageHeaderHandler","Discarding input message")

but I get a runtime error when I try that. I know this is pretty basic stuff, but any help would be appreciated.

0 2
0 400

How do I send request on production start?

Here's what I got so far in my production class:

ClassMethod OnStart(pTimeStarted As %String) As %Status
    job ..InitialTraining()
    quit 1

lassMethod InitialTraining() As %Status
    hang 5
    set sc = ##class(EnsLib.Testing.Service).SendTestRequest(...)
    quit sc

Is there a better way without hang, etc?


0 1
0 243
Scott Roth · Jan 13, 2021
Handling Errors

I have a case where our EMR is sending data, but not all the values needed for the Ancillary are valued properly and causes that message to error/halt processing on the Ancillary system, not ideal but its what they do. I would expect them to still process the message except that 1 field, but they don't.

I want to add validation to make sure certain fields are valued correctly for the Vendor. 

So I add some statements to take those items that don't pass this validation out to a batch file with headers.

0 9
0 317

I have a batch record mapper that reads a csv file and passes the message to a process that uses the EnsLib.MsgRouter.RoutingEngine and would like to pass the message to an operation that will output that as a XML file but so far been unlucky as the operation that I use , uses the EnsLib.EDI.XML.Operation.FileOperation which only works with the messages("BusinessOperation class for writing XML messages to a file.

0 2
0 738

Morning guys  I have a SQL operation that I use to read data and results to a record map. But seems to have trouble saving the objects to a record map as I get this message

ERROR ErrException: zInsertObject+2^%Library.RelationshipObject.1 -- logged as '-' number - @''

please help  here is my code let me know if I missing anything thank you in advance

0 2
0 389
Jack Mears · Nov 26, 2018
BPL - Foreach IF statement

As part of a BPL I am building I need to foreach over a some repeating elements and look for a certain value, if said value is present I need to forward the message to another operation. 

I can't seem to get the if statement inside the foreach loop to work and I think I am doing something wrong?

The error message I am getting:

ERROR <Ens>ErrException: <UNDEFINED>zS2+2^GWH.Messages.Eobs.AKISegmentCheck.Thread1.1 *k1 -- logged as '-' number - @' Set k1=request.GetNextIndex("PIDgrpgrp("_(1)_").ORCgrp()",k1,.tSCTrans)'

Can anyone explain that error to me?

0 3
0 448


We have a BPL that returns in Response several %Strings, Dates. When we try to add Array of Objects property to the Response we verified just before the BPL terminates the response object has correct values in all properties including the array. We checked the Count().  It appears that even array of String works correctly but we prefer to pass objects rather than strings.

0 2
0 273
Larry Pinsky · Feb 28, 2020
SQLCODE Error -400

I have a code block in a BPL.  I have the below SQL and code.  All variables have been declared and set.  When I run the SQL, if there are no values returned, I get 100 for the value of SQLCODE when I perform the FETCH, which is correct.  If values are returned, I get a -400 error when I perform the first FETCH.  I've investigated, but cannot find the reason for a -400 error.  Hoping someone out here understands this and knows what's wrong.

0 2
0 774

I work as an Integration Engineer for United States Department of Veterans Affairs (VA). I work on a Health Connect production which processes many RecordMap files. I do not fully understand RecordMaps and I wanted to develop an application for the Interoperability contest where I could learn more about working with RecordMaps. I browsed InterSystems documentation for inspiration on how to start. I was happy to find CSV Record Wizard.

0 0
0 219

I created a DTL to do HL7 mapping. The test function in the tools works the DTL perfectly but when used by the rule in my business process, the OBX segments are stripped and the MRN is gone. The assigning authority and ID type are added into the PID but the actual patient MRN is blank (3.1 value).


Here is the source code. 


0 8
0 546

Hi all,

For special definition of the company, we need to define a PoolSize according to the environment that the "Ensemble" is working.

So the first try as been add the parameter into "System Default Setting"

However, this parameter is not available in "Setting default values" in Setting tab.

I've opened the code of my production and I've noted that this parameter is a attribute of the XML element of this item

0 1
0 341

Hi all, My first post. I hope I have created it correctly.


Our team is looking to increase the number of characters in our Ensemble 'Categories' for Services, Processes and operations.

We are doing this to better identify things like Vendor, Message type and integrated application names...

One of our team members thought his might increase processing overhead and a discussion ensued that was not resolved.

my thoughts...

0 2
0 193
Larry Pinsky · Jan 20, 2021
Multiple Threads In Operations

I have a BPL that calls a business service (actually does lots of other things unrelated to my question).  We receive an acknowledgement back containing data that is processed in the BPL and sent to the source system. The process of sending to our downstream system "A" and receiving the response takes about 20 seconds per transaction (very slow on system A's side).  Due to this slowness, we end up with a backlog close to 1000 messages by the end of the workday.

0 4
0 171

Once a week we are attempting to load an XML file from Workday into a MS SQL table using JDBC and Store Procedures. There is approx 102999 records in this XML file. We are struggling with processing the entire file within a reason amount of time. We feed the XML through a BPL to then populate values in a stored procedure then call the stored procedure through a Business Operation. I have tried splitting out the Business Operations to make two calls, but we still continue to see an issue loading the XML into MS SQL.

0 4
0 127

Hi All


I have a BP which has a transformation. 

when I run the process I end up with the following error: 


ERROR <Ens>ErrBPTerminated: Terminating BP Propirion.BP.GetServices # due to error: ERROR <Ens>ErrGeneral: Object is immutable
ERROR <Ens>ErrGeneral: Object is immutable 


I have created a context named : HL7Message  type of: EnsLib.HL7.Message  and in the start of the BP assigned the request to it  (using set in assigned activity)


What did I miss ?




0 2
0 648


1) What's the correct way to check for an existence of a segment?  So far I have been doing this by checking to see if a required field is non-null, and this seems to work but is a bit clumsy. In this case, it’s an X12 message being checked in an IF action in BPL:


Or in a DTL, to see if a Z segment exists:


0 3
0 969
Larry Pinsky · Oct 27, 2017
Recordmap within a BPL

I have a text file that is fixed width delimited and am using a BPL to process this file, ultimately performing a transform from the text file to an HL7 message. I created a DTL, mapping from the recordmap to the HL7. In my BPL, I am performing some loops and other logic (that all is working). My issue is what to do when I perform the Transform.

0 1
0 523


I am sending a request message to Business Process which has one property as Dynamic Object type. So i get the JSON in my REST service and convert that as a dynamic object and set that in the request message and calling the business process from the business service. But the request is not getting sent to the Business Process. Is it possible to send dynamic object input to the business process.

0 18
0 657