none
Batching Error RRS feed

  • Question

  • I have this problem and I hope someone can give me a answer as I can't figure this out.

    I have my Batch Orchestration. This orchestration waits for individual EDI files, sends the individual EDI files to Biztalk Batch orchestration via a direct bound port.
     
    The Send message which send the EDI files to the Message Box has a Initializing Correlation set. Everything works fine (EDI files get batched and batch releases by the external trigger. ) But I have a problem, After bacthing the file gets doubled. If I have one record, after batching it becomes two records.
     
    When I remove the Initializing correlation from the Send message to the Message Box, I get a error saying "Persistant State Could not be sent to database". But the batch works and the batch file has one claim as I expect. This error gets logged in the event viewer and I get a suspended message in Biztalk Group Overview.
     
    Any idea why this is happening?

    My Orchestration is simmilar to this article

    http://blog.tsathish.com/?p=154

    Thanks


    Thursday, April 28, 2011 8:30 PM

Answers

  • Thanks a lot Sathish. I removed the Batch Marker Component. Now I don't get the records doubled and I don't have the Persistant State Error. Thanks for your help.

    /Roshan

    • Marked as answer by Rosh_Biz Friday, April 29, 2011 1:48 PM
    Friday, April 29, 2011 1:45 PM

All replies

  • Hi,

    The orchestration in the mentioned blog post takes already disassembled XML file's as input and creates batched EDI file (for the purpose of the sample in the blog i have already disassembled the EDI file and had the 837 disassembled XML files as input to the orchestration).

    To have the BizTalk Batching orchestration handle the messages the EDI Batch properties has to be properly set and promoted.

    Setting the Batch properties for the message can be done by using the BatchMarker Pipeline Component or Custom way (As mentioned in the Blog)

    Reason for Getting Two Records

    I believe you are promoting the EDI batch properties twice for the same message.I think the following is happening in your case

    1.  Individual EDI File -> Pipeline(with EDI Disassembler and Batch Marker Component) -> Message Submitted to MsgBox (Let's call the message as MsgI )

         In the above flow Msg I is set with the EDI Batch Properties by Batch Marker Component and submitted to MsgBox

    2.  Message (Msg I) from MsgBox -> to your Orchestration -> Batch Properties is set once again in the Orchestration - Once again submitted to MsgBox as new Message

         Lets call the message submitted by your orchestartion as Msg II 

    3.  BizTalk Batching orchestration subscribes to messages that has EDI batch properties. Since both Msg I and Msg II has the same EDI batch properties, they are consumed by batching orchestration and results in  having 2 records in the batched file.

    If the above case holds true in your case, you can remove the  Batch Marker Component in the step 1 and avoid the duplicate records.

    Error : "Persistent State Could not be sent to database"

    To promote message properties inside the orchestration, you can create a correlation set based on the properties and initialize the correlation set when you send the message to msgbox.

    When you remove the correlation in the orchestration, the orchestration goes to suspend state and does not submit Msg II to MsgBox, However Msg I is consumed by BizTalk Batch orchestartion  and it creates file with one record.


    Sathish - http://blog.tsathish.com - Please Indicate "Mark as Answer" if this Post has Answered the Question
    • Proposed as answer by SathishT Saturday, April 30, 2011 4:19 AM
    Friday, April 29, 2011 4:14 AM
  • Thanks a lot Sathish. I removed the Batch Marker Component. Now I don't get the records doubled and I don't have the Persistant State Error. Thanks for your help.

    /Roshan

    • Marked as answer by Rosh_Biz Friday, April 29, 2011 1:48 PM
    Friday, April 29, 2011 1:45 PM