Need Help with Trivial Orchestration

Home Page Forums BizTalk 2004 – BizTalk 2010 Need Help with Trivial Orchestration

Viewing 2 reply threads
  • Author
    Posts
    • #19031

      Hello,

      I’m new to BizTalk and I’m hoping someone will point me in the right direction.  I recently took a BizTalk class, and felt I understood things fairly well.  So I go back to my desk and start prototyping what is really a trivial application/orchestration.  It watches a folder for a flat-file.  Once found, it examines the contents of the flat file to obtain some information, then it FTP’s the file to another location, but renames it based on information contained in the file.  That part I got working pretty quickly.

      Here’s where things started to fall apart.  When the FTP is successful, I want to send a “success” email to myself.   If it fails (such as when the FTP login credentials are bad), I want to send a “failure” email to the BizTalk administrator and suspend the orchestration.  After the BizTalk administrator corrects the login information and resumes the instance, I’d like to receive the “success” email.

      This sounds so simple, yet I haven’t been able to make it work.  Perhaps I’m just not thinking in a BizTalk way.  What would be a good approach to this problem?

      Thanks

       

    • #19033

      First of all, this hardly seems like a trivial orchestration. 🙂

      So the hard part sounds like being able to trap that the FTP failed and then be able to recover from it. Your FTP request will be sent as part of a port which can be difficult to recover from. You might try putting all of the logic to do with FTP in a separate orchestration (in this case the child one) so that you can call the child orchestration from the parent orchestration and catch if the child orchestration failed. Then you would handle the email logic.

      By the way, you can use the SMTP adapter to send an email message.

      Thanks, 

    • #19042

      You want to look at a feature called “Delivery Notification”.  What happens is that the Orchestration will wait for an Acknowledgement(success) or Non-Acknowledgement(failure) flag from the Messaging engine.  You will be able to “trap” this error as a DeliveryFailureException.  So if you get beyond this exception, you know it was a success.

       Check out my blog post for more info:

       http://kentweare.blogspot.com/2007/11/biztalk-delivery-notification.html

      • #19104

        Thanks to both of you for your suggestions.  I setup the Delivery Notification, and then subscribed to the ACK/NACK messages generated to send the emails.  I still need to refine it a bit, but I think this should do the trick.

Viewing 2 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.