Split (Debatch) Message into many Messages

Home Page Forums BizTalk 2004 – BizTalk 2010 Split (Debatch) Message into many Messages

Viewing 3 reply threads
  • Author
    Posts
    • #19003

      Hi there

      I’m working with BizTalk-Server 2004 and I have the following Problem:

      I get an Input-xml-File representing a “Delivery Note”. This xml-File can contain several “order_references”. Now I would like to split this Input-xml-File in as many Output-xml-Files as there are “order_references” contained. Each Output-File has to include the “Delivery Note”-Header-Information.

      I tried Envelope-Debatching, but here but here I could not include the Header-Information.

      I tried Orchestration-Debatching with a xslt-File in the Mapping. Do I still need a Loop-Element in this case? 

      Can anybody give me a hint?

      Thanks Reto 

       

      So lets take a look at a sample Input-File:

      Input-File: 

        <?xml version=”1.0″ encoding=”utf-8″ ?>
      <delivery_note xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance>
        <message_header test_flag=”0 message_type=”delivery note document_version_date=”06.10.2004 document_version=”1.10 source=”ALSO ABC CH generation_date=”18.02.2008 generation_time=”16:39:43 />
      <delivery_note_header>
      <order_party>
      <buyer_party>
      <party_id>
        <LPAN>1083</LPAN>
        </party_id>
        </buyer_party>
      <ship_to_party>
      <party_id>
        <LPAN>0</LPAN>
        </party_id>
      <nameaddress>
        <PNA1>redIT Verkaufslager Zug</PNA1>
        <PNA2 />
        <PRFF />
        <PSTR>Chollerstrasse 32</PSTR>
        <PPOB />
        <PCTY>Zug</PCTY>
        <PPOC>6300</PPOC>
        <PCTR>CH</PCTR>
        </nameaddress>
        </ship_to_party>
        </order_party>
      <shipping_information>
        <ECUN />
        </shipping_information>
        </delivery_note_header>
      <delivery_note_body>
      <delivery_note_number>
        <DNNR>4838195</DNNR>
        <DNDT>18.02.2008</DNDT>
        <EDDT />
      <orderreference>
      <order_reference>
        <BORN>EB015406</BORN>
        <BORD>18.02.2008</BORD>
        <LPOC>00020</LPOC>
        <LPOT>SO</LPOT>
        <LORN>3004745</LORN>
        </order_reference>
      <order_reference>
        <BORN>EB015407</BORN>
        <BORD>18.02.2008</BORD>
        <LPOC>00020</LPOC>
        <LPOT>SO</LPOT>
        <LORN>3004746</LORN>
        </order_reference>
        </orderreference>
        </delivery_note_number>
        </delivery_note_body>
        </delivery_note>
       
      Here the two Output Files: 
       
       Output-File 1: 
       

        <?xml version=”1.0″ encoding=”UTF-8″ ?>
      <delivery_note xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance>
        <message_header test_flag=”0 message_type=”delivery note document_version_date=”06.10.2004 document_version=”1.10 source=”ALSO ABC CH generation_date=”18.02.2008 generation_time=”16:39:43 />
      <delivery_note_header>
      <order_party>
      <buyer_party>
      <party_id>
        <LPAN>1083</LPAN>
        </party_id>
        </buyer_party>
      <ship_to_party>
      <party_id>
        <LPAN>0</LPAN>
        </party_id>
      <nameaddress>
        <PNA1>redIT Verkaufslager Zug</PNA1>
        <PNA2 />
        <PRFF />
        <PSTR>Chollerstrasse 32</PSTR>
        <PPOB />
        <PCTY>Zug</PCTY>
        <PPOC>6300</PPOC>
        <PCTR>CH</PCTR>
        </nameaddress>
        </ship_to_party>
        </order_party>
      <shipping_information>
        <ECUN />
        </shipping_information>
        </delivery_note_header>
      <delivery_note_body>
      <delivery_note_number>
        <DNNR>4838195</DNNR>
        <DNDT>18.02.2008</DNDT>
        <EDDT />
      <orderreference>
      <order_reference>
        <BORN>EB015406</BORN>
        <BORD>18.02.2008</BORD>
        <LPOC>00020</LPOC>
        <LPOT>SO</LPOT>
        <LORN>3004745</LORN>
        </order_reference>
        </orderreference>
        </delivery_note_number>
        </delivery_note_body>
        </delivery_note>
       
      Output-File 2:

        <?xml version=”1.0″ encoding=”UTF-8″ ?>
      <delivery_note xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance>
        <message_header test_flag=”0 message_type=”delivery note document_version_date=”06.10.2004 document_version=”1.10 source=”ALSO ABC CH generation_date=”18.02.2008 generation_time=”16:39:43 />
      <delivery_note_header>
      <order_party>
      <buyer_party>
      <party_id>
        <LPAN>1083</LPAN>
        </party_id>
        </buyer_party>
      <ship_to_party>
      <party_id>
        <LPAN>0</LPAN>
        </party_id>
      <nameaddress>
        <PNA1>redIT Verkaufslager Zug</PNA1>
        <PNA2 />
        <PRFF />
        <PSTR>Chollerstrasse 32</PSTR>
        <PPOB />
        <PCTY>Zug</PCTY>
        <PPOC>6300</PPOC>
        <PCTR>CH</PCTR>
        </nameaddress>
        </ship_to_party>
        </order_party>
      <shipping_information>
        <ECUN />
        </shipping_information>
        </delivery_note_header>
      <delivery_note_body>
      <delivery_note_number>
        <DNNR>4838195</DNNR>
        <DNDT>18.02.2008</DNDT>
        <EDDT />
      <orderreference>
      <order_reference>
        <BORN>EB015407</BORN>
        <BORD>18.02.2008</BORD>
        <LPOC>00020</LPOC>
        <LPOT>SO</LPOT>
        <LORN>3004746</LORN>
        </order_reference>
        </orderreference>
        </delivery_note_number>
        </delivery_note_body>
        </delivery_note>

    • #19075

      Have you solved this issue? Have you tried splitter pattern ?

       

       

    • #19472

      Hello

       Have you solved this?
      I have managed to solve a similar problem using an XPATH loop to debatch the first message into several messages. I will gladly help out if this is still needed.

      • #24214

        I have got the same problem. It would be highly appreciated if you could send a sample example or more information.

         

    • #24258

      Hi,

       

         Check out the following sample from BizTalkGurus on how to do debatching:

       

      http://www.biztalkgurus.com/media/p/15518.aspx

       

          Daniel.

       

Viewing 3 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.