BizTalk 2010 997 : Message Type 997 is not allowed as part of the Agreement. RRS feed

  • Question

  • Hi,

    Running BizTalk 2010,  Trying to process a 997 Ack, that is automatically generated in BTS 2010. If the send port that is subscribing to the auto generated 997 is using the passthrough pipeline, the below message is delivered with no errors:

    <ns0:X12_997_Root IsGeneratedAck="true" xmlns:ns0="">

     If switch the pipeline in the send port to the EDISend Pipeline get the below error:

    A message sent to adapter "FILE" on send port "SndPortEDI997_EDIFor_LAG-DSHE" with URI "C:\DirectSupply\DSE\DSEBTS2004Code\DSE Transaction\Biztalk\MigratedBizTalk2010\Files\Out_X12_997_ForLAG_DSHE\%MessageID%.edi" is suspended.

    Error details: There was a failure executing the send pipeline: "Microsoft.BizTalk.Edi.DefaultPipelines.EdiSend, Microsoft.BizTalk.Edi.EdiPipelines, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "EDI Assembler" Send Port: "SndPortEDI997_EDIFor_LAG-DSHE" URI: "C:\DirectSupply\DSE\DSEBTS2004Code\DSE Transaction\Biztalk\MigratedBizTalk2010\Files\Out_X12_997_ForLAG_DSHE\%MessageID%.edi" Reason: Message Type 997 is not allowed as part of the Agreement.

    MessageId: {777FB827-AF10-4BF7-BC1F-F733F0828B88}

    InstanceID: {FE482BF4-2C2F-4F2E-9C7A-51E335779D9C}

     As far as I can see, when configuring an agreement, cannot choose a 997 message anywhere, for example , in the Transaction Set List. 

    Does anyone have any ideas?



    Monday, November 1, 2010 2:30 AM


All replies

  • Freddy,

    When you create the agreement between 2 parties, right click the sender party to create the agreement. First party should be the sender and the second party should be your receiver. I believe you have configured the other way around.



    Sathish -
    Monday, November 1, 2010 2:16 PM
  • Hi Sathish.

    I will give a try, but the message flow goes as below:

    MyCompany is Sending 850's to AnotherCompany and MyCompany expects to Receive back 997's acknowledgements for the 850's.

    AnotherCompany is Sending 810's 855's to MyCompany and AnotherCompany expects to Receive back 997 acknowledgements for the 810's 855's. This is the part where I am having the error as described in the original post.

    Therefore it is a true Two way agreement, ie both entities expecting back 997's with both parties acting as a Sender and Receiver. The BizTalk 2010 documentation seems to support this (ie creating one agreement for the above)?

    Anyways, I will play around with creating the agreement again, but in reverse.

    Monday, November 1, 2010 4:40 PM

    I set up as suggested above, and the Ack was working, but then I modified the Agreement to to process 850's. And now does not work again.

    (Get same error - Message Type 997 is not allowed as part of the Agreement)

    Microsoft provdied some examples to set up sending messages one way, (ie in the Walkthroughs) as below:

    But unfortunately,left out an example of processing a complete loop of messages. For example , I cannot find an example or walkthrough for a scenario as below:

    MyCompany sends out 850 to AnotherCompany , expects back a 997

    AnotherCompany Sends back 997's for (850's)

    AnotherCompany  sends out 810's 855's  to MyCompany

    MyCompany  sends out 997 acks for the 810's 855's  to MyCompany

    I can get the processing working one-way (ie Sending Messages from MyCompany  to AnotherCompany  or visa versa) , but as soon as  start modifying the Agreement to process the the other direction, everything stops working.

    Does anybody have an example of a setting up the Parties and Agreement, for a full message flow as above?

    My Abbreviated Agreement Set Up is as below:

    AnotherCompany -> MyCompany

    Configured the above tab for processing 810s, 855's, 997 acks for 810's 855's 

    MyCompany -> AnotherCompany

    Configured the above tab for processing and batching 850's

    From a high level does the above setup look correct?


    Tuesday, November 2, 2010 9:41 PM


    I tried to set up a similar scenario as you explained but with different transactions. Find below the sample agreement and Party Setup.


    Sender (Another Company ) - Apollo Hospital

    Receiver (My Company) - Best Care Group - (BizTalk is used by My Company).

    Sender - Another Company - Apollo Hospital sends 276, 837P,837I,837D to Best Care Group and expects 997 Acks for all these transactions.

    Receiver - My Company - Best Care Group sends 277 to Apollo Hospital and expects 997 Ack.


    Create Party For Receiver - My Company - Best Care Group . Use Default Profile and configure the Identifiers. (I am not using X12 Protocol Settings)

    Create Party For Sender - Another Company - Apollo Hospital . Use Default Profile and configure the Identifiers. (I am not using X12 Protocol Settings)

    Right Click Sender - Apollo Hospital Profile and select new Agreement

    Make sure the first Party is Sender - Another Company - Apollo Hospital and second party is Receiver - My Company - Best Care Group

    Set Protocol Set for Both the party is None General Properties.png

    Set Sender -> Receiver : Identifier Node

    Set Sender -> Receiver : Acknowledgment Node

    Set Sender -> Receiver : Transaction Set List  Node

    Here i have selected 276,837P,837D,837I as set of transactions received by My Company.

    Set Receiver -> Sender : Identifier Node

    Set Receiver -> Sender : Acknowledgment Node

    Set Receiver -> Sender : Envelope  Node

    I have set the above list of transactions with single agreement that support both Receive and Send EDI along with 997 Acks.

    Hope this solves your requirement.


    Sathish -
    • Marked as answer by Freddy King Friday, November 5, 2010 8:38 PM
    Wednesday, November 3, 2010 4:07 AM
  • Hi Sathish,

    Thanks so much for the detailed overview! I did try your set up with AnotherCompany -> MyCompany) set as the first tab in the agreement, but I will try it again and follow your instructions on my set of messages.

    One thing that may be different in my setup, is that I am batching my outgoing 850's . (in your case it would be a 277's). Maybe you are batching your 277's?


    My scenario for batching is as follows. A Flat File (non EDI message is submitted into BizTalk).

    1) Flat File is disassembled into XML in Rcv Location.

    2) XML message is published in MessageBox

    3) Orchestration subscribes to XML Message

    4) XML Message is mapped to BizTalk 850 3010 EDI Schema

    5) Before sending the EDI message out , set the following promoted fields.

    msgX12_00301_850(EDI.ToBeBatched) = true;

    msgX12_00301_850(EDI.DestinationPartyName) = "AnotherCompany";

    msgX12_00301_850(EDI.BatchName) = "BatchFor_AnotherCompany";

    6) Direct Send the above message into the Messagebox.

    7) My Batch configured on my Agreement (Tab MyCompany -> AnotherCompany), picks up the message and batched.

    The batching orchestration from the BizTalk documentation, does do some validation on the incoming  messages.

    If I have my agreement set up as:

    MyCompany -> AnotherCompany (First Tab)  /  AnotherCompany -> MyCompany (Second Tab)

    The above seems works

    If I have my Agreement set up as as the reveresed:

    AnotherCompany -> MyCompany (First Tab) / MyCompany -> AnotherCompany (Second Tab)

    The Bathing Orchestration fails with validating the message.

    Therefore my conclusion , what I was thinking was that when doing the batching, the Agreement Setup of

    AnotherCompany -> MyCompany (First Tab) / MyCompany -> AnotherCompany (Second Tab)

    does not work properly.  

    Maybe, I am erroneous of my conclusion.

    Sathish, do you have any thoughts on the above?

    Thanks Again.














    Wednesday, November 3, 2010 2:37 PM
  • Freddy,

    I do batch the 277 files. But i am batching everything in my orchestration and send the message to send port which has edisend pipeline.

    I don't use the batching orchestration feature by BizTalk server.


    Sathish -
    Wednesday, November 3, 2010 2:56 PM
  • Hi Sathish,

    Thanks for the quick response!

    Just curious as to why you do not use the built-in batching ?

    Any hints as to how you do your own custom batching? Are there any considerations when constructing this custom batched message?

    Thanks Again.

    Wednesday, November 3, 2010 3:08 PM
  • Freddy,

    I take information from database to create the 277 files.

    I take all the information for all the batches at one shot from the database and map to 277 schema. Out put from the map will have all the 277 batches and send it to send port to create the file.

    Sathish -
    Wednesday, November 3, 2010 3:14 PM
  • Hi Sathish,

    I am assuming that when you are doing this, you have to mimic what the built in batching process does and wrap your transactions in an envelope. Before you send to a send port configured with EDI Send Pipeline? . Something like below:

     <X12InterchangeXml DelimiterSetSerializedData="94:13:10:42:62:-1:-1:-1:-1">
    - <ns0:ISA xmlns:ns0="">
    - <FunctionalGroup DocType="">
    - <ns0:GS xmlns:ns0="">
    - <TransactionSet DocType="" TransactionSetActivityId="">
    - <ns0:X12_00301_850 xmlns:ns0=>
    - <ST>

    etc etc . More Transactions

    - <ns0:GE xmlns:ns0="">
    - <ns0:IEA xmlns:ns0="">

    Thanks Again.


    Wednesday, November 3, 2010 3:40 PM
  • Freddy,

    Create the map to map from source to edi message in the orchestration starting from ST to SE elements. Before sending the message to the send port update the

    send277Msg(EDI.DestinationPartySenderQualifier) = "ISA07 Value";
    send277Msg(EDI.DestinationPartySenderIdentifier) = "ISA08 Value";
    send277Msg(EDI.DestinationPartyReceiverQualifier) = "ISA05 Value";
    send277Msg(EDI.DestinationPartyReceiverIdentifier) = "ISA06 Value";

    Sathish -
    Wednesday, November 3, 2010 9:59 PM
  • Hi Sathish,

    So in the end what was causing the error -> Message Type 997 is not allowed as part of the Agreement. Was on my Agreement Config for:

    MyCompany  -> AnotherCompany  agreement tab. I had set:

    Transaction Set List

    SupportTransaction Sets from the list:

    850-Purchase Order

    When I removed this, and the list was empty, then the error went away.

    I had noticed that you did not set anything on your Transaction Set List for -> Best Care Group -> Apollo Hospital Tab.


    I did set my Agreement Config as:

    MyCompany  -> AnotherCompany (First Tab)

    AnotherCompany -> MyCompany  (Second Tab)

    Also on the AnotherCompany Part, I unchecked ->

    Local BizTalk Processes messages received by the party or supports sending messages from party.

    With the above set, everything worked as expected.

    Anyways, thanks for all your help!



    Friday, November 5, 2010 8:38 PM