|
Home > Archive > BizTalk Server General > July 2004 > BizTalk exception handling
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 exception handling
|
|
| darin dimitrov 2004-06-30, 5:55 pm |
| Hello,
Is it possible to catch an exception thrown in an orchestration
before it gets logged to the system logger? For example, if an error
occurs within a file send port (i.e. wrong file permissions or
inexistant send folder), what shapes should I use in my orchestration
in order to catch this error and how can I reroute the workflow in
case of such error, so that I can notify the user?
P.S. I am using BizTalk 2004
| |
| David Stucki [MSFT] 2004-06-30, 5:55 pm |
| You can put your Send shape in a transaction and add a catch block that
catches a DeliveryFailureException. The InnerException property of the
caught exception will be a SoapException that has this detailed
information. Make sure that your send port in the orchestration is
Binding->Specify Later and Delivery Notification->Transmitted.
I'm attaching a sample that shows how to catch an exception, extract this
detail text, and send it to an output file.
David Stucki
This posting is provided "AS IS" with no warranties and confers no rights.
| |
| Ben Cuttriss 2004-07-16, 5:50 pm |
| Darin,
I've seen a couple of examples of patterns to re-route the content in the event of exceptions. One way is to basically handle the exceptions, then decide on the outcome, another is simply to throw the exception to the point in time that you can re-act.
I prefer the first - exceptions being thrown should be in case of serious error and not as a way of controlling application flow (maybe there are others that would dispute this... I'm not sure.)
I prefer to handle the expected routing issues, then deal with exception as unlikely, unwanted situations. It makes the orchestration a bit more complex with decision shapes all over, but it's not too bad. Nesting orchestrations makes this a little easi
er.
Also, you can do a lot of this work up front using the Orchestration plug in for visio which generates a lot of this initial stuff for you and you can use a template. Another way is to drop into a .Net component that does some of the routing for you and
keep the orchestration at a higher abstracted level. Another way...
HTH.
Ben
"darin dimitrov" wrote:
> Hello,
>
> Is it possible to catch an exception thrown in an orchestration
> before it gets logged to the system logger? For example, if an error
> occurs within a file send port (i.e. wrong file permissions or
> inexistant send folder), what shapes should I use in my orchestration
> in order to catch this error and how can I reroute the workflow in
> case of such error, so that I can notify the user?
>
> P.S. I am using BizTalk 2004
>
| |
| Jeremy 2004-07-29, 5:51 pm |
| David,
Do you have this sample that you referred to in the post?
"David Stucki [MSFT]" wrote:
> You can put your Send shape in a transaction and add a catch block that
> catches a DeliveryFailureException. The InnerException property of the
> caught exception will be a SoapException that has this detailed
> information. Make sure that your send port in the orchestration is
> Binding->Specify Later and Delivery Notification->Transmitted.
>
> I'm attaching a sample that shows how to catch an exception, extract this
> detail text, and send it to an output file.
>
> David Stucki
> This posting is provided "AS IS" with no warranties and confers no rights
|
|
|
|
|