none
Is it a bug ?? Batching in 2009 RRS feed

  • Question

  • Hi, I recently ran into a situation where I need to batch per transaction type using BizTalk Server 2006 R2 EDI. Unfortunately, as 2006 R2 does not support invoking multiple batching orchestration for a given party, so as suggested I downloaded a trial version of 2009 and tried hands on batching there. 2009 gives a clean approach to create multiple batches which I liked a lot but seems like the EDI Send pipeline isn't ready to validate my batched message.

    The scenario: I receive an ASN flat-file containing Header, Order & Item data, which I transform to X12 00401 856 on the receive port. The transformed message is received by an orchestration which populates and promotes the below mentioned EDI context properties on the message.

    EDI.DestinationPartyName = "partyname"
    EDI.BatchName = "batchname"
    EDI.ToBeBatched = True

    After these properties are worked upon, the message is then dumped to the messagebox from where the batching orchestration subscribes the message and adds it to the batch.

    The send port has the filter criteria set for the above mentioned properties with only a change i.e. EDI.ToBeBatched == False
    Send port does subscribe to the batch messages and when it comes to executing the EDI Send pipeline, there is an error reported saying error while reading stream data and it reports some structural issues with the message.

    Whereas when I extract the actual message from the batched message and validate the same against the X12 schema, it validates fine.

    When I turn off the batching and apply filter to the send port based on the message type, the EDI Send pipeline works like a charm and creates a perfectly fine X12 document.

    I am wondering, is this a bug with batching in 2009 ??

     

    --Anoop

    Tuesday, March 30, 2010 5:44 PM

Answers

  • Also, if you have Extended validation turned on at the party settings, I would like you to turn it off. I have seen some issue with extended validation of batched messages in the past.

     

    Atin Agarwal

    • Marked as answer by AnoopVishnoi Wednesday, April 7, 2010 10:05 AM
    Tuesday, April 6, 2010 7:03 AM

All replies

  • Hi Anoop

    Can you please paste the actual error that is thrown by the send pipeline.

    Nikhil

    Tuesday, March 30, 2010 6:01 PM
  • Nikhil,

    Here you go ...

    Event Type: Error
    Event Source: BizTalk Server 2009 EDI
    Event Category: None
    Event ID: 8116
    Date:  3/30/2010
    Time:  8:28:35 PM
    User:  N/A
    Computer: AV-BIZTALK-2009
    Description:
    Error: 1 (Miscellaneous error)
     5: X12_00401_856\HLLoop1\MEA\MEA01\ The element 'MEA01' cannot contain child element 'MEA01' because the parent element's content model is text only.

    Error: 2 (Miscellaneous error)
     505: The element 'MEA01' has an invalid structure

     

    I am no where creating MEA01 within itself ... verified that twice

     

    --Anoop

    Wednesday, March 31, 2010 7:17 AM
  • Anoop

    I have reproduced the error only when I am having MEA01 inside MEA01 but this is not valid. I would advise you to recheck the xml in the send port. Else you can paste the input here so that I can also have a look on it.

    Nikhil

    Wednesday, March 31, 2010 7:48 AM
  • http://cid-4cb900a4a4c3d182.skydrive.live.com/embedicon.aspx/Public

    Nikhil, you can find the batched file here ... please take a look, there's no MEA01 within MEA01 ... still the pipeline fails ... with the error reported as:

    Event Type: Error
    Event Source: BizTalk Server 2009
    Event Category: BizTalk Server 2009
    Event ID: 5754
    Date:  3/31/2010
    Time:  2:03:21 PM
    User:  N/A
    Computer: AV-BIZTALK-2009
    Description:
    A message sent to adapter "FILE" on send port "Honda.Canada.X12.856.Outbound.FILE" with URI "C:\Projects\Novelis EDI Honda Canada\X12Outbound\856_%MessageID%.dat" is suspended.
     Error details: Unable to read the stream produced by the pipeline.
     Details: Error: 1 (Miscellaneous error)
     5: X12_00401_856\HLLoop1\MEA\MEA01\ The element 'MEA01' cannot contain child element 'MEA01' because the parent element's content model is text only.

    Error: 2 (Miscellaneous error)
     505: The element 'MEA01' has an invalid structure 
     MessageId:  {BB119C78-318F-4014-93D2-029CDBAF1C5F}
     InstanceID: {1B6B7473-D25D-43F5-A210-5D4EAA200FFF}

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Event Type: Error
    Event Source: BizTalk Server 2009 EDI
    Event Category: None
    Event ID: 8116
    Date:  3/31/2010
    Time:  2:03:21 PM
    User:  N/A
    Computer: AV-BIZTALK-2009
    Description:
    Error: 1 (Miscellaneous error)
     5: X12_00401_856\HLLoop1\MEA\MEA01\ The element 'MEA01' cannot contain child element 'MEA01' because the parent element's content model is text only.

    Error: 2 (Miscellaneous error)
     505: The element 'MEA01' has an invalid structure

     

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Wednesday, March 31, 2010 8:38 AM
  • I was not able to reproduce the error with the file give by you. The only error that I got is

    Details:"Unable to read the stream produced by the pipeline.

    Details: Error in serialization ".

    The problem was with MEA03 which is having leading and trailing zeros. Just changed the party settings to allow it and it started working. May be because I have 2006 R2 setup but the way assembler works is exactly the same. But can you just try again with changing these setting.

    Nikhil

    Saturday, April 3, 2010 12:04 PM
  • Also, if you have Extended validation turned on at the party settings, I would like you to turn it off. I have seen some issue with extended validation of batched messages in the past.

     

    Atin Agarwal

    • Marked as answer by AnoopVishnoi Wednesday, April 7, 2010 10:05 AM
    Tuesday, April 6, 2010 7:03 AM
  • @Nikhil: I got this error onto BizTalk Server 2006 R2 environment even. I changed the datatype of MEA03 to xs:string which validated the instance perfectly ... but this xml instance fails to process when file is dropped to the receive location folder.
    Anyway, I will try not changing the datatype for MEA03 and see if it works.

     

    @Atin: That's the only thing which I haven't tried ... I'll try disabling the extended validation on party. Even then, turning off extended validation doesn't prove that there isn't a bug :-) ... will for sure give it a try.

     

    --Anoop

    Tuesday, April 6, 2010 8:25 PM
  • Anoop

    It should work absolutely fine with R2 as I have tested it out. Or there can be a chance that a hotfix might effect the functionality. I would like to know what hotfixes you have installed on the system.

    Nikhil

    Wednesday, April 7, 2010 4:26 AM
  • Anoop

    It should work absolutely fine with R2 as I have tested it out. Or there can be a chance that a hotfix might effect the functionality. I would like to know what hotfixes you have installed on the system.

    Nikhil

    Wednesday, April 7, 2010 4:27 AM
  • Anoop

    It should work absolutely fine with R2 as I have tested it out. Or there can be a chance that a hotfix might effect the functionality. I would like to know what hotfixes you have installed on the system.

    Nikhil

    Wednesday, April 7, 2010 4:27 AM
  • Also, if you have Extended validation turned on at the party settings, I would like you to turn it off. I have seen some issue with extended validation of batched messages in the past.

     

    Atin Agarwal


    Atin, seems like your recommendation works. I turned off extended validation on party and the batched message was now processed without any error.

    --Anoop

    Wednesday, April 7, 2010 9:42 AM
  • Yes, most likely it will be a bug with extended validation of batched message. Extended validation is useful if user has encoded any custom validation rules in the schema. If you are not using any custom validation ruls in the EDI Schema, you should be fine turning off the Extended validation.

    Atin Agarwal

    Wednesday, April 7, 2010 5:23 PM
  • Yes, most likely it will be a bug with extended validation of batched message. Extended validation is useful if user has encoded any custom validation rules in the schema. If you are not using any custom validation ruls in the EDI Schema, you should be fine turning off the Extended validation.

    Atin Agarwal

    Wednesday, April 7, 2010 5:23 PM