none
HL7 Accelerator 2.0 RRS feed

  • Question

  • When I try to send an HL7 message (BizTalk format with 3 message parts) through the BTAHL72XPipelines.BTAHL72XSendPipeline pipeline, I receive this error :

     

    Type de l'événement : Erreur
    Source de l'événement : BizTalk Server 2006
    Catégorie de l'événement : BizTalk Server 2006
    ID de l'événement : 5720
    Date :  2007-07-06
    Heure :  11:05:20
    Description :
    There was a failure executing the send pipeline: "BTAHL72XPipelines.BTAHL72XSendPipeline, BTAHL72XPipelines, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "BTAHL7 2.X Assembler" Send Port: "SndHL7Transform_HL7" URI: "D:\BTS\OUT\%MessageID%.xml" Reason: Object reference not set to an instance of an object.

    Pour plus d'informations, consultez le centre Aide et support à l'adresse http://go.microsoft.com/fwlink/events.asp.

    I followed the enrichment tutorial instructions to test if a basic send could works but it failed. Is it a bug in the Assembler or may it be a property value missing? I really don't know where to search for this.

     

    Using : BTS 2006 R2 RC1, HL7 accelerator v2, WinXp Sp2

     

     

    Friday, July 6, 2007 4:19 PM

Answers

  • Sorry I forgot to tell that the assembler is expecting an int as a value for the MessageEncoding. With the current release (I think) it's impossible to set the MessageEncoding correctly. The schema defining the MessageEncoding property define it as a decimal. If you open your dll in reflector, you'll see that the value is cast in Decimal. Microsoft sent us a dll that correct the problem but i'm  not allowed to send it to you. As a workaround, you can create a custom pipeline component that assign the message encoding property with the value already there but with a cast as int.

     

    Example :

    inmsg.Context.Write("MessageEncoding", "http://HL7Schemas.HeaderPropertySchema",

    System.Convert.ToInt32(inmsg.Context.Read("MessageEncoding", "http://HL7Schemas.HeaderPropertySchema")));

     

    Tuesday, October 9, 2007 7:24 PM

All replies

  • I would check to make sure that you created the Message Parts in order and that the context properties are set correctly.
    Tuesday, July 10, 2007 7:33 PM
  • OK I checked the message parts and they are in the correct order : msh, body, z. I would like to check the properties but I don't know if they are correct

     

    In the message assignment, I have the following assignments :

     

    HeaderInfo = new System.Xml.XmlDocument();

    HeaderInfo.LoadXml("<ns0:MSH_25_GLO_DEF xmlns:ns0=\"http://microsoft.com/HealthCare/HL7/2X\"><MSH><MSH.2_EncodingCharacters>^~\\&amp;</MSH.2_EncodingCharacters><MSH.3_SendingApplication><HD.0_NamespaceId>SrcApp</HD.0_NamespaceId><HD.1_UniversalId>SrcAppUid</HD.1_UniversalId></MSH.3_SendingApplication><MSH.4_SendingFacility><HD.0_NamespaceId>srcFac</HD.0_NamespaceId><HD.1_UniversalId>srcFacUid</HD.1_UniversalId></MSH.4_SendingFacility><MSH.5_ReceivingApplication><HD.0_NamespaceId>dstApp</HD.0_NamespaceId><HD.1_UniversalId>dstAppUid</HD.1_UniversalId></MSH.5_ReceivingApplication><MSH.6_ReceivingFacility><HD.0_NamespaceId>dstFac</HD.0_NamespaceId><HD.1_UniversalId>dstFacUid</HD.1_UniversalId></MSH.6_ReceivingFacility><MSH.7_DateTimeOfMessage><TS.1>200307092343</TS.1></MSH.7_DateTimeOfMessage><MSH.8_Security>sec</MSH.8_Security><MSH.9_MessageType><CM_MSG.0_MessageType>ADT</CM_MSG.0_MessageType><CM_MSG.1_TriggerEvent>A04</CM_MSG.1_TriggerEvent></MSH.9_MessageType><MSH.10_MessageControlId>msgid2134</MSH.10_MessageControlId><MSH.11_ProcessingId><PT.0_ProcessingId>P</PT.0_ProcessingId></MSH.11_ProcessingId><MSH.12_VersionId><VID_0_VersionId>2.3</VID_0_VersionId></MSH.12_VersionId></MSH></ns0:MSH_25_GLO_DEF>");

    DoorbellFinalMessage.MSHSegment = HeaderInfo;

    DoorbellFinalMessage.BodySegments = DoorbellOutputMessage;

    DoorbellFinalMessage.ZSegments = "";

    DoorbellFinalMessage(BTAHL7Schemas.MSH1) = 124;

    DoorbellFinalMessage(BTAHL7Schemas.MSH2) = "^~\\&";

    DoorbellFinalMessage(BTAHL7Schemas.ParseError) = false;

    DoorbellFinalMessage(BTAHL7Schemas.ZPartPresent) = false;

    DoorbellFinalMessage(BTAHL7Schemas.SegmentDelimiter2Char) = true;

     

    Is this correct? Am I doing something wrong?

    Monday, July 23, 2007 1:59 PM
  • It actually depends on which way you created the multi-part message.

    I have wrote about it here:

    http://blog.hl7-info.com/archive/2006/08/26/Inner_exception_Multipart_message_has_body_part_BodySegments_expected_body.aspx

     

    Eric

    http://blog.hl7-info.com

     

    Monday, July 23, 2007 2:03 PM
  • Thanks for the quick reply. The message part are created in the correct order. And as you said in your post, for outgoing messages the pipeline component is intelligent enough to put the things together.

     

    So, are you able to make the enrichment tutorial working with BTS 2006 R2 and BTAHL7 2.0? I receive a NullReferenceException in the Assembler component.

     

    There was a failure executing the send pipeline: "BTAHL72XPipelines.BTAHL72XSendPipeline, BTAHL72XPipelines, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "BTAHL7 2.X Assembler" Send Port: "SndHL7Transform_HL7" URI: "D:\BTS\OUT\%MessageID%.xml" Reason: Object reference not set to an instance of an object.

     

     

    Monday, July 23, 2007 2:12 PM
  • Did you find the solution for this?

    Tuesday, October 9, 2007 2:55 PM
  • Yes, you have to set the MessageEncoding property. However, there is some bugs with the different encoding types. Be carefull.

    Tuesday, October 9, 2007 4:34 PM
  •  

    What are those bugs?
    Tuesday, October 9, 2007 4:36 PM
  • For example, there was some encoding errors when a different encoding was specified in the receive pipeline. When a message received in UTF8 was also send by a send port, the encoding was not UTF8. I don't know if the final release of the accelerator has been released. Perhaps the encoding bugs have been corrected yet. I don't have this info now.

    Tuesday, October 9, 2007 4:43 PM
  • is it possible for you to send me the sample. I just build the sample ... but still

    getting the same error....

     

    Anyway ... what encoding you have set?

    Tuesday, October 9, 2007 5:53 PM
  • Do you have any working example similar to Message Enrichment Tutorial which works with BTS R2 and A4HL7 V2?

     

    Is it poosible for you to send a link or post here?

     

    Tuesday, October 9, 2007 6:31 PM
  • Sorry I forgot to tell that the assembler is expecting an int as a value for the MessageEncoding. With the current release (I think) it's impossible to set the MessageEncoding correctly. The schema defining the MessageEncoding property define it as a decimal. If you open your dll in reflector, you'll see that the value is cast in Decimal. Microsoft sent us a dll that correct the problem but i'm  not allowed to send it to you. As a workaround, you can create a custom pipeline component that assign the message encoding property with the value already there but with a cast as int.

     

    Example :

    inmsg.Context.Write("MessageEncoding", "http://HL7Schemas.HeaderPropertySchema",

    System.Convert.ToInt32(inmsg.Context.Read("MessageEncoding", "http://HL7Schemas.HeaderPropertySchema")));

     

    Tuesday, October 9, 2007 7:24 PM
  • cool .... let me try this

     

    Tuesday, October 9, 2007 8:15 PM
  • thanks it does works Smile ....

     

    Really appreciated your help Smile

    Tuesday, October 9, 2007 9:19 PM
  • I am getting the same error message as up above. I built a custon pipeline but the error still occurs. Can you please give me, step-by-step, the instructions on how to build this custom pipeline?

     

    What I did:

     

    Build an encoder pipeline component and placed the code from your example in the Execute method (all other methods are blank)

     

    Built a send pipeline that uses the BTAHL7 2.X Assembler and my Encoder component

     

    Set the SendPort to use my new Send Pipeline

    Wednesday, October 31, 2007 7:37 PM
  • You have to know that the pipeline components are executed in sequence. The error is raised from the BTAHL7 Assembler because it needs this property to be set. So you have to create a custom pipeline component which will be at a stage before the Assemble step. I think that the exact name is the Pre-Assemble stage. So set the property at this stage and the HL7 assembler will be able to retreive it.

     

    Good luck!

    Thursday, November 1, 2007 12:11 PM
  •  

     

    Just hit this problem and found that the hotfix for the HL7 Accelerator v2.0 fixed my problem.

     

    The hotfix can be found here http://support.microsoft.com/default.aspx/kb/941261

     

    Graham

    Thursday, November 27, 2008 1:18 PM
  • Yes, I forgot to mention it. We had some discussions with the HL7 Accelerator team and they did the Hot-Fix for that.

     

    Great to see that it helps someone!

    Thursday, November 27, 2008 10:50 PM
  • Hi

    I know this is an old issue. Just want to see if anybody encountered the same issue in BizTalk 2010 Accelerator? 

    I encountered the same issue in Biztalk 2010. I have tried:

    - Set the Messageencoding property in receive pipeline via Management Console

    - Select the correct MessageCharset in my custom receive pipeline

    So far no  luck. Even though the receive pipeline uses the correct MessageCharset and the message has the correct messageEncoding, the SendPipeline is always thrown the same error. It seems the property was lost somewhere.

    Of course creating a custom pipeline works, but I want to see if anybody knows if this issue is fixed in 2010.

     

    thanks,

    Dennis

    Monday, October 24, 2011 9:34 PM