none
EDI over WCF request-response port - how to catch failed messages and send response over a 2 way port RRS feed

  • Question

  • I'm using BizTalk 2009.  I've written an orchestration for accepting 270's and returning 271's, and another for 276's and 277's.  The incoming and outgoing EDI stream is wrapped in XML.  I've published the schema using the WCF publishing wizard, and I am using the WCF-WSHttp adapter.  I have custom pipeline components to unwrap and wrap the XML, and to handle the NACK generated by the adapter.  Everything works fine if valid EDI is received. 

    However, I'm challenged with handling failures from the EDI disassambler.  The specification I've been given is to return a 271 or 277 in all cases (or as many as possible).  What I would like to do is catch the failed message, generate a (271 or 277) response, and return that response over the 2-way port.  I know how to enable failed message routing and how to subscribe to the message if it were to come in over a one-way port.  It seems that this cannot be done when the message comes in over a 2-way port. 

    Any suggestions on how this can be done?

    Monday, September 19, 2011 7:39 PM

Answers

  • If message has invalid EDI structure it will return TA1 or 997/999. You can turn off validation part in pipeline and then validate message in your orchestration. This way you may catch message with invalid data and create 271/277 from there.  
    Thanks, Angela
    Monday, September 19, 2011 9:54 PM

All replies

  • If message has invalid EDI structure it will return TA1 or 997/999. You can turn off validation part in pipeline and then validate message in your orchestration. This way you may catch message with invalid data and create 271/277 from there.  
    Thanks, Angela
    Monday, September 19, 2011 9:54 PM
  • I should have mentioned that turning off as much EDI validation as I can in the pipeline is already part of my approach.  However, to my knowledge, there are some validations (such as incorrect segment count in the SE) that cannot be disabled.  Regarding the TA1/997/999 - because this is a real time transaction, I'm not generating any.  Still, to take your suggest, I decided to generate a 997, thinking I could at least subscribe to it and if the 997 indicated a failure, to generate the response (in the form of a 271 or 277) that my trading partner is expecting.  What I found was that the 997 was being returned through the send pipeline of the 2 way port, EVEN WHEN I set RouteAckOn2WayPort to False on the receive pipeline!  This produces even more work for me, because now I have to "eat" the acknowledgement so that the 271 or 277 can get through.

    Monday, September 26, 2011 8:23 PM
  • By unchecking the "Route ACK to send pipline on request-response receive port on the party, I am to get the desired behavior for the 997.  In summary, I believe your suggestion will work.  Problem solved!  Thank you.

    Tuesday, September 27, 2011 4:46 PM
  • Nevin,

    I have the exact same requirement to generate 271 even if there is an exception in the EDI Disassembler.Would you mind sharing information on how you were able to accomplish this? What  needs to be done on the orchestration to eliminate the ack files. Thank you!!!!

    Thursday, January 30, 2014 5:58 AM