Search code examples
biztalkbiztalk-2013

Delivery Notification Failure issue


My requirement is based on the messagetype field in the XML schema I have to route the incoming message to two (one as primary and another one as secondary) FTP locations and send an email notification to client saying the message has been transmitted to two ftp folders.

If there is any failure in sending the message to primary ftp location, then the message has to be transmitted to secondary ftp location and failure email has to be trigger to client.

Design which I have implemented is inside decision shape I am checking the message type and inside scope I have created 2 send ports and expression shape to send email notification. For handling exception for first logical send port I have set the Delivery Notification=transmitted and in catch block I am sending failure notification. This logic is working fine in case of success but in case of failure I am getting both success and failure email notifications when I try to test.

Can someone help me to fix this?


Solution

  • You need to have a separate scope with an exception block around each send shape. In your exception blocks set a a different variable (default true) to say if that send has not succeeded (false). After both of the send scopes, have a decision shape that looks at these variable to see if both succeeded, only send 1 succeeded or only 2 succeeded and send the email based on that.