none
Send alert email using SMTP adapter from delivery notification of a send port? RRS feed

  • Question

  • My orchestration requires to send a file in the end. And I put this SND_Port1 into a scope, configure the send port with Delivery Notification set to Transmitted. in the exception handler, it use SND_Port2 to send the alert email.

    From the article on MSDN mentioned thisWhen a message is sent from an orchestration through a send port configured for delivery notification, then the orchestration receives a delivery notification regardless of whether the error message has been routed. In other words, the send port generates a delivery notification for the orchestration even if the port encounters a messaging failure during processing. The notification confirms delivery to the port, but does not address successful processing through the port.

    So my understanding is as long as it is delivered to the port, even the file is not reach to a file destination on the local drive, the Delivery Notification will return true or confirmed to the orchestration. Which means as long as the file reaches the port, the alert email will always be sent, that seems not what I want.

    I am wondering if I can use enable routing failed message feature on the SND_Port1, subscribe the failed message to the SND_Port2 using SMTP adapter to send the email. If this is the idea, which filter should I use to subscribe to the failed message?

    Thank you.

    Thursday, September 6, 2012 4:28 AM

Answers

  • Yes you could activate Routing failure for failed message option on Snd_Port1.

    In that case, BizTalk Server will promote error-report-related message context properties and demote regular message context properties before publishing the failed message.

    Then you could add SND_Port2 subscribing for failed messgae with following filter condition :

    ErrorReport.FailureCode Exists
    You could have a look at ESB Toolkit as well: It implements that logic with the help of a web application - called Management Portal - collecting failed messages into a SQL Server database and sending notifications if needed.


    Christophe BRANDO...If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Thursday, September 6, 2012 7:02 AM

All replies

  • Yes you could activate Routing failure for failed message option on Snd_Port1.

    In that case, BizTalk Server will promote error-report-related message context properties and demote regular message context properties before publishing the failed message.

    Then you could add SND_Port2 subscribing for failed messgae with following filter condition :

    ErrorReport.FailureCode Exists
    You could have a look at ESB Toolkit as well: It implements that logic with the help of a web application - called Management Portal - collecting failed messages into a SQL Server database and sending notifications if needed.


    Christophe BRANDO...If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Thursday, September 6, 2012 7:02 AM
  • Yes you could activate Routing failure for failed message option on Snd_Port1.

    In that case, BizTalk Server will promote error-report-related message context properties and demote regular message context properties before publishing the failed message.

    Then you could add SND_Port2 subscribing for failed messgae with following filter condition :

    ErrorReport.FailureCode Exists
    You could have a look at ESB Toolkit as well: It implements that logic with the help of a web application - called Management Portal - collecting failed messages into a SQL Server database and sending notifications if needed.


    Christophe BRANDO...If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    It seems reasonable solution, but after I tried it, nothing happens, I guess it is because my receive port is a two-way request and response port. And the failure happens at the response stage.
    Wednesday, September 26, 2012 3:27 AM