Sending an email notification RRS feed

  • Question

  • Hello Experts,

    We currently have a BizTalk application where we receive a CSV file and does an insert in to the Oracle Database using a stored procedures. But is there a way to send a notification if there is any issue while inserting the received data in to the Database. I understand we can insert a send port for email notification but not sure how check if there is any issue in the insert process.

    Wednesday, October 19, 2016 4:13 PM


  • Hi Vdha

    Since the exception will originate on the SendPort instance, you cannot simply catch the exception in your orchestration.

    You have two options-

    a) To handle the exception within the orchestration itself, you need to enable Delivery Notification, with an exception handler to catch Microsoft.XLANGs.BaseTypes.DeliveryFailureException. Refer below sample on how to implement this-

    2) Alternatively, you can enable Failed Message routing on the Oracle SendPort. Now, you can subscribe to these failed messages that occur on the Oracle SendPort. In an orchestration/SendPort that sends mail notifications, you can subscribe to these Oracle failed messages, for example, you can set Filters on either ErrorReport.SendPortName or, ErrorReport.MessageType and construct your mail notification message accordingly using a map. Send this message out via SMTP adapter.

    Thanks Arindam

    Wednesday, October 19, 2016 5:50 PM

All replies