BizTalk Server Orchestration - Sending mail from CatchException block

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > January 2005 > Sending mail from CatchException block





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 Sending mail from CatchException block
CyberLotus

2005-01-26, 2:47 am

Hi,

In my BizTalk orchestration, I'm using a exception handler. In the
CatchException block, I want to send an e-mail ("attaching the exception log"
- this is optional).

How can I do that?

Please let me know as it's very urgent.

Thanks in advance.

Regards,
Lotus
David

2005-01-26, 2:47 am

I call .NET component/.DLL to send the exception notice mail, bue I do
not know how to attach the exception log in it.

David

CyberLotus

2005-01-26, 7:47 am

So, from the CatchException block you are calling a class/method to send
mails, right?

Lotus

"David" wrote:

> I call .NET component/.DLL to send the exception notice mail, bue I do
> not know how to attach the exception log in it.
>
> David
>
>

CyberLotus

2005-01-27, 2:50 am

Hi Joe,

My Problem is that I'm putting a CatchException block in a parallel branch.
This branch is passing a result message (say MsgResult) to another scope.
Now, if I do anything, like call a method to send mail or use schema to send
message in that CatchException block, the build error I'm getting is "use of
unconstructed message 'MsgResult'", which is being used by the next scope.

Apparently, it's blocking the MsgResult to pass to the next scope, but it
shouldn't be. Because whatever thing I do in the CatchException block, it
should block the MsgResult only when Exception occured.

Please let me know, if you understood the problem and give me your suggestion.
Also, I've sent the snapshot of my orchestration in your hotmail account.

Thanks a lot.

Regards,
Lotus


"Joe Gaska" wrote:

>
> You can use MOM to do what you are stating you want to do (had to say that).
> Attached is a sample class which wraps the exception objects and allows you
> to serialize the exception to a XML string then you can fire the email off.
> If you wanted to get fancy you could apply a translation to the serialized
> object and form a nice email.
>
> If you have any questions post them back and I will respond.
>
> -Joe
>
>
> "CyberLotus" <CyberLotus@discussions.microsoft.com> wrote in message
> news:34DD75D1-F1FE-480E-A8AE-1D573019FE85@microsoft.com...
>
>
>

Joe Gaska

2005-01-27, 5:49 pm

Lotus;

Ah, I see what you are trying to do. A scope essentially makes the messages
constructed local to that scope, when you try and access the messages from
outside the scope the compiler does not like it. Messages created above the
scope shape (could have nested scope shapes) would be global to that
"Context".

1.) Try removing the scope shapes on your parrallel actions, if you need a
scope wrap the entire process in a scope leave the last one. That should do
it.

Let me know if that does not fix it, I have a few other ideas but would
rather not unless you have to. Below are a few good reads related to what
you are doing.

-Joe

I have to quote an article by Charles Young about scope (don't know how I
remembered where it was)
http://geekswithblogs.net/cyoung/ar...ansactions.aspx

"....Scope shapes could more accurately be called 'Context' shapes. They
define a context which maintains state for a defined unit of orchestration
code, and this can include transaction state."


A few good reads applicable to you. (maybe change your scope layout which
changes your problem), might add ability for global exception handling when
needed.

http://www.traceofthought.net/Perma...e5e1ec29b3.aspx














"CyberLotus" <CyberLotus@discussions.microsoft.com> wrote in message
news:3B0E6462-57AA-4417-A856-43CD73BD2B35@microsoft.com...
> Hi Joe,
>
> My Problem is that I'm putting a CatchException block in a parallel

branch.
> This branch is passing a result message (say MsgResult) to another scope.
> Now, if I do anything, like call a method to send mail or use schema to

send
> message in that CatchException block, the build error I'm getting is "use

of
> unconstructed message 'MsgResult'", which is being used by the next scope.
>
> Apparently, it's blocking the MsgResult to pass to the next scope, but it
> shouldn't be. Because whatever thing I do in the CatchException block, it
> should block the MsgResult only when Exception occured.
>
> Please let me know, if you understood the problem and give me your

suggestion.[vbcol=seagreen]
> Also, I've sent the snapshot of my orchestration in your hotmail account.
>
> Thanks a lot.
>
> Regards,
> Lotus
>
>
> "Joe Gaska" wrote:
>
that).[vbcol=seagreen]
you[vbcol=seagreen]
off.[vbcol=seagreen]
serialized[vbcol=seagreen]
send[vbcol=seagreen]
do[vbcol=seagreen]


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com