BizTalk Server Orchestration - BizTalk 2004 Orchestrations: DeliveryFailureException - BUG??

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > June 2005 > BizTalk 2004 Orchestrations: DeliveryFailureException - BUG??





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author BizTalk 2004 Orchestrations: DeliveryFailureException - BUG??
Craig Beuker

2005-06-10, 5:51 pm

Greetings all,

Am doing some testing with regaurd to the delivery notification
failure exception on a send orchestration shape.

Here is what I have:

a simple orchestration:

[Receive Message]
[Scope - long running trx: Start]
[Expression - Set destination dynamic port address to
nonexistant folder. And Trace Statement (pre-send)]
[Send - to dynamic port]
[Expression - Trace Statement (post-send)]
[Scope - End Normal Flow]
[Scope - Catch Section: Delivery Failed Exception]
[Expression - Trace Statement (exception)]
[Scope - End Catch]
[Scope - End]

Basically:
1) I receive a message in the orchestration (which is a long running trx)
2) The Scope starts, sets the dynamic destination port address to a non-
existant folder (ie: Guarentee failure). As well as write a trace
statement using System.Diagnostics.Trace.Writeline.
3) Send the message to the dynmaic port.
4) If the send goes well, the 2nd trace statement should be shown and the
catch should be skipped.
5) If the send fails (which it should), control goes to the catch
section. and the trace statemene from that section is shown.

The dynamic send port has the Delivery Notification property set to
Transmitted such that the orchestration gets told about the failure.

What is actually happening:
I drop the message into the pickup folder, and it is picked up.
The orchestration throws the file at the dynamic port (with the bogus
destination set). The port fails (as expected). However, at this point,
the expression AFTER the send port (post-send) fires and I see the trace
statement from that expression. Control THEN goes to the catch section
and I see that Trace Statement (exception).

Here is what I see in DebugView:

[3768] Pre Send
[3768] Send Complete
[3768] Post Send, Error Occured:
Exceptions.Types.DeliveryFailureException

Now it seems to me, that if an exception occurs in the scope block,
control should immediately go to the catch blocks. Basically anything
after the shape where the problem occured would get skipped. Much like a
regular Try/Catch block in C#. Should it not?

ie: I should not see the "Send Complete" trace statement.

I am using BizTalk Server 2004, Service Pack 1, on Windows 2000.

Am I missing something, or is something just generally wrong here?


Thanks in advance

cmb..
Stephen W. Thomas

2005-06-12, 2:47 am

Hello.

Funny you should ask this question. A few other BizTalkers and I were
talking about this exact same scenario over several days at Tech Ed this week.

When working with Delivery Notification, the process waits for the
notification at the end of the scope shape. This means that any code after
the send shape will get executed regardless of the outcome of the Send.

I would always suggest making the Send the very last shape inside the scope
to avoid problems.

In addition, you do not have to use a Synchronized scope shape like the help
docs state.

Hope this helps.

Stephen W. Thomas
http://www.biztalkgurus.com


"Craig Beuker" wrote:

> Greetings all,
>
> Am doing some testing with regaurd to the delivery notification
> failure exception on a send orchestration shape.
>
> Here is what I have:
>
> a simple orchestration:
>
> [Receive Message]
> [Scope - long running trx: Start]
> [Expression - Set destination dynamic port address to
> nonexistant folder. And Trace Statement (pre-send)]
> [Send - to dynamic port]
> [Expression - Trace Statement (post-send)]
> [Scope - End Normal Flow]
> [Scope - Catch Section: Delivery Failed Exception]
> [Expression - Trace Statement (exception)]
> [Scope - End Catch]
> [Scope - End]
>
> Basically:
> 1) I receive a message in the orchestration (which is a long running trx)
> 2) The Scope starts, sets the dynamic destination port address to a non-
> existant folder (ie: Guarentee failure). As well as write a trace
> statement using System.Diagnostics.Trace.Writeline.
> 3) Send the message to the dynmaic port.
> 4) If the send goes well, the 2nd trace statement should be shown and the
> catch should be skipped.
> 5) If the send fails (which it should), control goes to the catch
> section. and the trace statemene from that section is shown.
>
> The dynamic send port has the Delivery Notification property set to
> Transmitted such that the orchestration gets told about the failure.
>
> What is actually happening:
> I drop the message into the pickup folder, and it is picked up.
> The orchestration throws the file at the dynamic port (with the bogus
> destination set). The port fails (as expected). However, at this point,
> the expression AFTER the send port (post-send) fires and I see the trace
> statement from that expression. Control THEN goes to the catch section
> and I see that Trace Statement (exception).
>
> Here is what I see in DebugView:
>
> [3768] Pre Send
> [3768] Send Complete
> [3768] Post Send, Error Occured:
> Exceptions.Types.DeliveryFailureException
>
> Now it seems to me, that if an exception occurs in the scope block,
> control should immediately go to the catch blocks. Basically anything
> after the shape where the problem occured would get skipped. Much like a
> regular Try/Catch block in C#. Should it not?
>
> ie: I should not see the "Send Complete" trace statement.
>
> I am using BizTalk Server 2004, Service Pack 1, on Windows 2000.
>
> Am I missing something, or is something just generally wrong here?
>
>
> Thanks in advance
>
> cmb..
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com