![]() |
![]() |
|
|||||||
| Register | Forum Rules | Getting Started! - Guide | Blog | Videos | Gallery | Members List | Social Groups | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
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 |
|
|
|
#2 |
|
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 > > |
|
|
|
#3 |
|
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 > > |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |