Use of unconstructed message in BizTalk orchestration

There is common issue that is “use of unconstructed message” when developing BizTalk project. Visual studio gives that error while compiling BizTalk project because we are trying to use message which has not yet initialized.


In fact BizTalk message is a XML document. The first way to construct message follows;

1.Creating a message with the help of a System.XML.XMLDocument variable. We have to first declare an orchestration variable of type XmlDocument.Then in a message assignment shape, need to do something like this:

xmlDoc = new XmlDocument();


outputMsg= xmlDoc

If we use outputMsg directly in the construct shape, it gives compilation error.
We create instance of XmlDocument, the issue is resolved.


2.Create new message from an existing message using BizTalk map

3.Assign one message to other(i.e creating a copy of an existing message)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s