Dienstag, 10. März 2009

Details of Errors caused by ThrowException Shape

When you design a BizTalk orchestration and you want to suspend the orchestration with a ThrowException shape, it is useful to initialize the exception variable in an Expression shape with a descriptive error message in advance.

Example:

incomingMessageNotFoundException = new System.Exception("No referenced incomingMessage found"); (*)

(*): In this example incomingMessageNotFoundException is the exception variable of type System.Exception.

The result is that the error message "No referenced incomingMessage found" is shown in the Error Information tab of the Service Details window if an orchestration instance gets suspended because of this error. If you do not initialize the variable yourself, BizTalk uses the default constructor and you only get the information that an exception of type System.Exception has occured in your orchestration. This does not help much.