RE: Send File and Get Confirmation.. Possible?
From: Ian Cross (Cassium) (IanCrossCassium_at_discussions.microsoft.com)
Date: Sat, 19 Feb 2022 06:01:04 -0800
You should be able to use delivery notifications for this purpose.
Basically, what you need to do is:
Put the Send shape inside a non-transactional but synchronized scope
Set the Delivery Notification property to 'Transmitted' on the Port
Add an exception handler to the bottom of the synchronized scope that
catches a DeliveryFailureException
Basically, the orchestration will not move passed the end of the
synchronized scope until it knows whether the send was successful or not.
Using this approach, you can design your orchestration to behave accordingly.
Bear in mind that there is a performance penalty associated with using
delivery notifications, because under the covers, BizTalk is using special
Ack / Nack correlated messages to accomlish the work. However, don't worry
too much about this penalty unless you're dealing with 10's of orchestrations
Hope this makes sense.
> I did a little test..
> I created an orchestration in which I used a SQL Adapter to get
> information, then I sent that info to 2 diffent file locations.
> So it went:
> Receive (SQL Adapter) > Send (File - c:\Test1\) > Send (File
> Then, while it was running, I changed the actual name of the c:\Test1
> directory to c:\TestOld ..
> I figured that the whole process would halt, but it didn't. It just
> keep sending files to c:\Test2\ and creating error messages in the
> Event Monitor.
> I want it to stop everything. Because in the end the process will be
> Receive (SQL Adapter) > Send (File - c:\Test1\) > Send (SQL
> Adapter Update)
> But the last thing I want to do, it update the record in SQL if the
> file never made it to it's location.
> So if there an exception I can use with Ports?