Larry Pinsky · Feb 6, 2020
Opening Files Within A BPL

I have two files that I ultimately need to combine.  The first file contains data from a PO.  The second file contains tracking information.  What I thought about doing was create a BS that grabs the first file, loads it into a record map and transfers it to a BPL.  Then, the BPL would open the second file where I would write code to load the file into a second record map and then insert the tracking information to the correct places in the first file based on PO line items.

0 3
1 182

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 199
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 476


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 1,003


We are developing a BP where we would need to call at the same time to get appointments in two external systems. So then, we would need two threads, one for primary care appointments, and other for specialist appointments . We need to paralelize both calls because of both of them require some time and we would need to shorten it as much as possible.


We are currently using a flow:

0 3
0 184

What are the pros and cons of developing a custom database driven routing engine vs. using the Ensemble standard routing engine. What I'm trying to accomplish with the custom routing engine is less manual intervention every time a new route is added. The con I can see with the custom engine is performance may lag behind the standard engine. My development vs. Intersystems essentially.

I appreciate feedback. Thanks!

0 3
0 358

Is it possible to dynamically adjust the RetryInterval andFailureTimeout settings in a BPL?

I've got a business process that calls a web service operation to get a session ID from an external system.  There is a string property returned in the body of the response that indicate an exception occurred in the external system. I have code in the BPL that examines the property and sets the status property to an error status when that occurs.

0 3
0 517

Hello  ,

         Ensemble Business Process seems like red color but it still processing message successfully. I have checked log, events, queue everything is clear. there is no log info or error in the history.  If BP is in red color in the sense might have some issues, but is still processing messages successfully.

 Can you guys please advice on this.

0 3
0 213

I have a call in a business process that returns a response which may contain a collection of error message. I use the following code in my response builder to extract the messge value from the first error and map them to a context variable:

Set    context.ErrorMessage   callresponse.result.GetAt(1).errors.GetAt(1).message

0 2
0 248

I am trying to use EnsLib.SQL.Operation.GenericOperation for retrieving (multiple) rows. But I am looking for a way to handing a StreamContainer returned by the operation, in my business process such as receiving it in the Context object and packing it to a request to call another business operation.

Does anyone have sample code to do this?


1 2
0 62



We would need to know the Ens.Response SourceConfigName to identify which Operation has raised an exception.

We have tried:

$$$LOGINFO("..%Process.%PrimaryResponseHeader.SourceConfigName..: "_..%Process.%PrimaryResponseHeader.SourceConfigName) //It outputs an empty string
$$$LOGINFO("response.SourceConfigName: "_response.SourceConfigName) //It generates an exception


We would need to get from an Ens.Response which body is null, its SourceConfigName:

0 2
0 206

I'm looking at an issue where I need to grab an ID number from an external SQL table when it doesn't exist in a HL7 message, and then add it to the HL7 message.

I have built the logic within a BPL which checks for the lack of ID, and then pulls the ID from the SQL table (and storing its value using the context functionality within the BPL) however I am at a loss as to how I then take the ID and add it to the HL7 message before passing it to a router.

0 2
0 427

I have a handful of EnsLib.HL7.MessageRouter sending an HL7 message to a single Business Process (Ens.BusinessProcess).

In the OnRequest method, I am declaring pRequest as EnsLib.HL7.Message

What I need to do is determine which HL7 Router sent any given request to my BusinessProcess. 

To do this, I know that I need to fetch the SourceConfigName property from the Ens.MessageHeader of the Request, but I am not sure how (or if) I can fetch this data from within the OnRequest Method.

Does anyone have any pointers?

Bill Casey

0 2
0 128

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 426

There has been some confusion about how to edit Business Process Language (BPL) and Data Transformation Language (DTL) files in Atelier using the graphical editor. The following steps describe how to do this with Atelier version 1.0:

Copy the file you want to edit from the server to an Ensemble-enabled project in your Atelier workspace. To do this, find the file in the Server Explorer, right click and select Copy to project.

Open the file in the Atelier class editor just as you would any other class file.

5 2
1 691

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 769

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 402


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 293
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 863

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 197