So I was bound and determined to find out the behavior of how BizTalk handles the order of messages.

I created the following flow within BizTalk. This is a two step process. BizTalk gets messages, distributes them to three different subscribers, three send ports and one orchestration.

Here is the flow:

image

So the MLLP receive location looks like this:

image

The non-ordered send port simply does not have the following check mark

image

The ordered send port looks like this:

image

The orchestration looks like this: I put an atomic scope shape so that I wouldn’t pick up the same message, as I was filtering off of the InboundTransportLocation. So in the orchestration, I changed the inbound transport location to localhost:99999 so no other orchestrations would pick it up, and I simply could bind the send port to the logical port.

image

Things I discovered:

The unordered send port runs fast, however, as you can see from the messages. They are definitely not in any order…

image

The ordered delivery send port does keep the messages in the right order. However, look at how long it takes to process those messages! It is nearly 2-3 seconds between messages! As I was watching the active send port, looking at the messages, I could see the messages slowly leaving.

image

Here are the times it took to process each of the messages

image

The Orchestration process keeps the order intact, and processes the messages just as fast as the unordered send port.

image

It is apparent that the check mark for ordered delivery in the send port is executing different logic than the orchestration that has the same ordered delivery setting.

My recommendations is to use a convoy orchestration to order the messages and send them on.

Ordered Delivery

 Uncategorized  Comments Off
May 022012
 

So today I was questioned about how to setup ordered delivery using the MLLP adapter. I decided to put together a sample demo, to make sure that I remembered how to do it.

The first thing I did was put together a batch of 20 messages. Each message had a different control number, along with the same control number in the EVN segment.

image

The next thing I did was setup the receive location

image

So I ran all of the files into BizTalk

image

I had the send port stopped so I could see what went on. I turned on tracking so I can look into the message. I ran the following query and this is what I got

image

If I look at the first message (11:13:23.573) I see this control number:

image

I can look through the messages and confirm that the order is correct. Here is the last message (11:13:23.767)

image

So I created an orchestration to process these messages. I set the port to pick up messages off the message box set the Ordered Delivery to True and proceeded to log the number of the message (an internal integer that increases for each message) and the control number from the MSH segment.

image

image

Running them again, the event log shows that they are logged in order:

image

image

Hope that this was as fun for you to read as it was for me to put together!

HL7 Tutorial

 Uncategorized  Comments Off
Apr 262012
 
 

While putting together a POC, I wanted one side of my parallel shape to only pick up pdf documents when the file was not marked as an error from the HL7 pipeline marking the message with a parse error:

image

But how could I access it?

You need to reference the following assembly in your project:

C:Program Files (x86)Microsoft BizTalk 2009 Accelerator for HL7BinMicrosoft.Solutions.BTAHL7.HL7Schemas.dll

Once you do that, you can add the following filter:

image

 

When you install hot fix 973910, you will come across this error:

Error1920

The issue is that the hot fix does not know the username/password that the Logging Service uses, so it wipes it out:

Error1920Issue

So you set the credentials and continue and you are ready to go.

 

I have come across this ‘INFORMATIONAL’ event log message a few times and after much banging of heads (mine in particular), Microsoft has a hot fix for the following message:

Event Type:    Information
Event Source:    BizTalk Accelerator for HL7
Event Category:    None
Event ID:    4119
Date:        3/10/2010
Time:        2:35:25 PM
User:        N/A
Computer:   
Description:
An empty batch was received with fragmentation turned on. The 1st 1kb of the message is

MSH|^~&|…

 

Username:
Time: 3/10/2010 2:35:24 PM

However, when searching for this, I was not apparent that it is referring to the following KB 973910 article

 

While enhancing a custom ORU^R01 schema, there was a Z segment at the end (that I did not want to place in the ZSegments message part.

I went happily creating the schema, deployed it and ran it, and received the following errors:

Event Type:    Error
Event Source:    BizTalk Accelerator for HL7
Event Category:    None
Event ID:    4097
Description:
Fatal error encountered in 2XDasm. Exception information is Object reference not set to an instance of an object.

followed by

Event Type:    Error
Event Source:    BizTalk Server 2009
Event Category:    (1)
Event ID:    5719
Description:
There was a failure executing the receive pipeline: “BTAHL72XPipelines.BTAHL72XReceivePipeline, BTAHL72XPipelines, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ Source: “BTAHL7 2.X Disassembler” Receive Port: “One Way Receive Port” URI: “D:DataLabMedicityInput*” Reason: Object reference not set to an instance of an object.

and

Event Type:    Error
Event Source:    BizTalk Server 2009
Event Category:    (1)
Event ID:    5753
Description:
A message received by adapter “FILE” on receive location “Medicity Pickup” with URI “D:DataLabMedicityInput*” is suspended.
Error details: There was a failure executing the receive pipeline: “BTAHL72XPipelines.BTAHL72XReceivePipeline, BTAHL72XPipelines, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ Source: “BTAHL7 2.X Disassembler” Receive Port: “One Way Receive Port” URI: “D:DataLabMedicityInput*” Reason: Object reference not set to an instance of an object. 
MessageId:  {E182624C-BD9A-422A-B13B-CD7E108B5B30}
InstanceID: {72120031-57DB-418B-AEE3-A4E3A039017F}

This is the schema that I had created:

ZSegment_Bad

If I look at the documentation on Z Segment creation I see this:

Type the name of the field, starting the name with the first three digits of the segment name, followed by a period and the number of the field, followed by an underscore and then a short description of the field. The description should be one or a series of words, without spaces, with the first letter of each word capitalized. Press Enter.

To create a field with components, create the field as a record, and then create a child element of that record for each component. To create a field with subcomponents, create the field and components as records, and the subcomponents as child elements. Note that subcomponents cannot be composite data types. For example, for the segment named ZPP_PatientPreferencesSegment, you might create a ZPP.1_Dietary field and a PD.1 Allergies component with a PD.1.1_FoodGroupAllergy subcomponent. The PD.1.1_FoodGroupAllergy subcomponent would have to be a simple data type.

So this is a special behavior for the Z Segments, where you MUST use the period instead of the underscore if the first character is a number, notice the difference between two segments:

ZSegment_Good

 

I know that there are many different reasons why you would be getting this error, but I wanted to document one way you can try to get the BTAHL7 DASM:

Error happened in body during parsing
Error # 1
Segment Id: GT1_Guarantor
Sequence Number: 1
Field Number: 51
Error Number: 102
Error Description: Data type error
Encoding System: HL7nnnn

 

The data looks like this:

|^NOT EMPLOYED|

The first sub element needs to be set to a max of 0 instead of blank (default 1)

As I discover other fixes I will update this entry…

 

Reason: Could not load file or assembly ‘file:///C:Program Files (x86)Microsoft BizTalk Server 2009Pipeline ComponentsMicrosoft.Solutions.BTAHL7.HL72fDasm.dll’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

Make sure that your host is running under 32bit mode, if it is running in 64 bit mode, you will get this error.

 

I was importing an MSI into one of our regions, and I received the following error:

“Import/Copy failed as there are active/pending batches. Stop active/pending batches and try importing/copying. (Microsoft.BizTalk.Edi.PartnerAgreementManager)

Pending Batches

I was deploying a lot of pipeline components and by simply stopping the BizTalk service(s), it installed successfully.

© 2012 HL7 and BizTalk Blog Suffusion theme by Sayontan Sinha