AspAlliance.com LogoASPAlliance: Articles, reviews, and samples for .NET Developers
URL:
http://aspalliance.com/articleViewer.aspx?aId=1279&pId=-1
CodeSnip: Log a BizTalk Orchestration Message into the Windows Event Log
page
by Naveen Karamchetti
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30960/ 70

Introduction

The following are the steps to Log a message into the Windows Event Log.

Steps

First, Open the Orchestration Designer for the Orchestration.

Go to the Orchestration View.

1. Create a variable of type System.Xml.XmlDocument, name it "xmlDocument."

2. Create an expression shape.

3. Assign the message variable which you want to log into the EventLog.

4. Use the property xmlDocument.OuterXML.

Figure 1: The Expression Shape

Notice the Expression shape in the figure given below.

Figure 2: The Expression Editor

For example:

xmlDocument = MsgEchoIn;
System.Diagnostics.EventLog.WriteEntry("Message XML", xmlDocument.OuterXML);
Conclusion

This simple statement can sometimes be a time and effort saver when you would need to debug and find out the actual message content. Use this as often as possible when writing medium to large sized orchestrations.


Product Spotlight
Product Spotlight 

©Copyright 1998-2019 ASPAlliance.com  |  Page Processed at 2019-09-15 4:24:21 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search