Dec 092009
 

The below setting is somewhat misunderstood:

Preserve1

If you are to set this setting, what is passed to the Message Box, and what is the behavior.

To simulate this, I created a send port with the following setting:

image

When I ran the 867 (found in the samples folder of the SDK) I got the following error message:

There was a failure executing the send pipeline: “Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35” Source: “XML assembler” Send Port: “EDI Drop Off” URI: “C:\Users\Administrator\Documents\Visual Studio 2008\Projects\EDI\Output\%MessageID%.xml” Reason: This Assembler cannot retrieve a document specification using this type: http://schemas.microsoft.com/BizTalk/EDI/X12/2006/InterchangeXML#X12InterchangeXml.

I could not find the schema in the BizTalk 2009 folder.

Here is the data that is created by the EDI DASM with the Preserve Interchange setting:

<ins0:X12InterchangeXml DelimiterSetSerializedData="126:13:10:42:58:-1:-1:-1:-1" xmlns:ins0="http://schemas.microsoft.com/BizTalk/EDI/X12/2006/InterchangeXML">
  <ns0:ISA xmlns:ns0="http://schemas.microsoft.com/Edi/X12ServiceSchema">
    <ISA01>00</ISA01>
    <ISA02>          </ISA02>
    <ISA03>00</ISA03>
    <ISA04>          </ISA04>
    <ISA05>ZZ</ISA05>
    <ISA06>7654321        </ISA06>
    <ISA07>ZZ</ISA07>
    <ISA08>1234567        </ISA08>
    <ISA09>991221</ISA09>
    <ISA10>1226</ISA10>
    <ISA11>U</ISA11>
    <ISA12>00401</ISA12>
    <ISA13>000000025</ISA13>
    <ISA14>0</ISA14>
    <ISA15>T</ISA15>
    <ISA16>:</ISA16>
  </ns0:ISA>
  <FunctionalGroup DocType="http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_864">
    <ns0:GS xmlns:ns0="http://schemas.microsoft.com/Edi/X12ServiceSchema">
      <GS01>TX</GS01>
      <GS02>01</GS02>
      <GS03>1234567</GS03>
      <GS04>19991221</GS04>
      <GS05>1226</GS05>
      <GS06>2</GS06>
      <GS07>X</GS07>
      <GS08>004010</GS08>
    </ns0:GS>
    <TransactionSet DocType="http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_864">
      <ns0:X12_00401_864 xmlns:ns0="http://schemas.microsoft.com/BizTalk/EDI/X12/2006">
        <ST>
          <ST01>864</ST01>
          <ST02>3313</ST02>
        </ST>
        <ns0:BMG>
          <BMG01>00</BMG01>
        </ns0:BMG>
        <ns0:DTM>
          <DTM01>001</DTM01>
        </ns0:DTM>
        <ns0:N1Loop1>
          <ns0:N1>
            <N101>001</N101>
          </ns0:N1>
          <ns0:N2>
            <N201>N201</N201>
          </ns0:N2>
          <ns0:N3>
            <N301>N301</N301>
          </ns0:N3>
          <ns0:N4>
            <N401>N401</N401>
          </ns0:N4>
          <ns0:REF>
            <REF01>01</REF01>
            <ns0:C040>
              <C04001>01</C04001>
              <C04002>C04002</C04002>
            </ns0:C040>
          </ns0:REF>
          <ns0:PER>
            <PER01>1A</PER01>
          </ns0:PER>
        </ns0:N1Loop1>
        <ns0:MITLoop1>
          <ns0:MIT>
            <MIT01>MIT01</MIT01>
          </ns0:MIT>
          <ns0:N1Loop2>
            <ns0:N1_2>
              <N101>001</N101>
            </ns0:N1_2>
            <ns0:N2_2>
              <N201>N201</N201>
            </ns0:N2_2>
            <ns0:N3_2>
              <N301>N301</N301>
            </ns0:N3_2>
            <ns0:N4_2>
              <N401>N401</N401>
            </ns0:N4_2>
            <ns0:REF_2>
              <REF01>01</REF01>
              <ns0:C040_2>
                <C04001>01</C04001>
                <C04002>C04002</C04002>
              </ns0:C040_2>
            </ns0:REF_2>
            <ns0:PER_2>
              <PER01>1A</PER01>
            </ns0:PER_2>
          </ns0:N1Loop2>
          <ns0:MSG>
            <MSG01>MSG01</MSG01>
          </ns0:MSG>
        </ns0:MITLoop1>
        <SE>
          <SE01>18</SE01>
          <SE02>3313</SE02>
        </SE>
      </ns0:X12_00401_864>
    </TransactionSet>
    <ns0:GE xmlns:ns0="http://schemas.microsoft.com/Edi/X12ServiceSchema">
      <GE01>1</GE01>
      <GE02>2</GE02>
    </ns0:GE>
  </FunctionalGroup>
  <ns0:IEA xmlns:ns0="http://schemas.microsoft.com/Edi/X12ServiceSchema">
    <IEA01>1</IEA01>
    <IEA02>000000025</IEA02>
  </ns0:IEA>
</ins0:X12InterchangeXml>

So what can consume this message?

If you look at Preserving a Received Batched EDI Interchange, it does not explain about what happens to the document.

If you look at Sending a Preserved Batch Interchange, it will recreate the interchange based on the settings described on the page.

I asked why there is this option, to preserve interchange, getting a document that is only consumable by the EDI ASM, and was told that you can create a map that transforms all of the EDI transactions from one to another and keep the batch together, however this does not seem correct, because a map would be looking for a MessageType of http://schemas.microsoft.com/BizTalk/EDI/X12/2006#X12_00401_864, not http://schemas.microsoft.com/BizTalk/EDI/X12/2006/InterchangeXML#X12InterchangeXml

It seems that this is only for validation, or re-enveloping.

  • Manoj Agarwal

    Hi Eric,

    You can still apply the transaction set type level maps on the message produced by the EDI Receive pipeline in preserve interchange mode.

    In the case mentioned at the end of your post, if you specify a map from 864 to some other message type, the EDI ASM will transform all the 864s and still keep the batch together.

    Please let me know if you don’t see it working properly.

    Thanks!

  • Eric,

    Found a way to map preserved interchanges. The trick is to create a schema from the full interchange XML, map the document, move the xslt to a Custom XSL file, and then change the X12InterchangeXml node of your created schema to an Any type. Delete Import references in your schema (usually the App1 and App2 schemas) that conflict with previously deployed schemas (usually the transaction set schema) and it works.

    Sid

  • BizTalk Blows

    Spent a yr convincinb mgmt to get BizTalk. We got vers 2009.

    Some advice…if you have a previous vers of Biztalk stay with it. 2009 doesn’t work worth a Gawd Damned crap!

    Now mgmt is throwing Microsoft out & bring in Gentran.

    Thanx Microsoft…you really suck the big Juan

  • Don’t have money to buy a building? You not have to worry, because this is available to get the loan to work out all the problems. Therefore take a consolidation loan to buy everything you need.

  • Set your life time more easy get the home loans and everything you want.

  • I had a desire to start my own business, however I didn’t have got enough amount of cash to do it. Thank goodness my close colleague proposed to use the business loans. Thus I used the student loan and made real my old dream.

  • Various people in every country take the home loans in different creditors, because that’s simple and comfortable.

  • People deserve good life time and loans or just collateral loan would make it better. Because people’s freedom bases on money.

  • Some time ago, I did need to buy a car for my organization but I didn’t earn enough money and could not order something. Thank goodness my mother proposed to try to take the loans at banks. Thus, I did so and was satisfied with my collateral loan.

  • That is understandable that cash can make us disembarrass. But what to do when one has no cash? The one way is to get the business loans and just credit loan.

  • That’s perfect that we are able to get the mortgage loans moreover, it opens up completely new possibilities.