TechTalkz.com Logo Ask the Expert

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft BizTalk Server

Notices

Routing failed messages

Microsoft BizTalk Server


Reply
 
Thread Tools Display Modes
Old 12-11-2007, 02:33 PM   #1
Piotrek
Guest
 
Posts: n/a
Routing failed messages

Hi.

I have an orchestration, which has receive shape with filter:
(ErrorReport.ErrorType == "FailedMessage").
Then in all my ports (both receive and send) I check "Enable routing
for failed messages" check box. In mentioned orchestration I create e-
mail body in such way:
varBody.AppendLine("Receive Port Name: " +
msgFailedMessage(ErrorReport.ReceivePortName) );

The problem occures when routing failes on Send port. In such case
there is no ReceivePortName and this piece of code throws an
exception. How can I check if e.g. Error.ReceivePortName value in
msgFailedMessage is not null?

Regards,
Piotrek

  Reply With Quote
Old 12-11-2007, 03:33 PM   #2
NDJ
Guest
 
Posts: n/a
RE: Routing failed messages

The only way I have seen this done is to set a variable to
msgFailedMessage(ErrorReport.ReceivePortName) within a scope and catch the
exception if it occurs. Then set the variable to a suitable default within
the exception handler. If there is a better way I'd like to see it too! N

"Piotrek" wrote:

> Hi.
>
> I have an orchestration, which has receive shape with filter:
> (ErrorReport.ErrorType == "FailedMessage").
> Then in all my ports (both receive and send) I check "Enable routing
> for failed messages" check box. In mentioned orchestration I create e-
> mail body in such way:
> varBody.AppendLine("Receive Port Name: " +
> msgFailedMessage(ErrorReport.ReceivePortName) );
>
> The problem occures when routing failes on Send port. In such case
> there is no ReceivePortName and this piece of code throws an
> exception. How can I check if e.g. Error.ReceivePortName value in
> msgFailedMessage is not null?
>
> Regards,
> Piotrek
>
>

  Reply With Quote
Old 13-11-2007, 01:39 AM   #3
Thiago
Guest
 
Posts: n/a
RE: Routing failed messages


Hi Piotrek,

In the expression where you are building the message body use

if (ErrorReport.ReceivePortName exists msgFailedMessage)
{
varBody.AppendLine("Receive Port Name: " +
msgFailedMessage(ErrorReport.ReceivePortName) );
}

Thiago Almeida
http://connectedthoughts.wordpress.com

"Piotrek" wrote:

> Hi.
>
> I have an orchestration, which has receive shape with filter:
> (ErrorReport.ErrorType == "FailedMessage").
> Then in all my ports (both receive and send) I check "Enable routing
> for failed messages" check box. In mentioned orchestration I create e-
> mail body in such way:
> varBody.AppendLine("Receive Port Name: " +
> msgFailedMessage(ErrorReport.ReceivePortName) );
>
> The problem occures when routing failes on Send port. In such case
> there is no ReceivePortName and this piece of code throws an
> exception. How can I check if e.g. Error.ReceivePortName value in
> msgFailedMessage is not null?
>
> Regards,
> Piotrek
>
>

  Reply With Quote
Reply

Thread Tools
Display Modes



< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 01:48 PM.


vBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2010, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional