Reputation: 10296
I have a BizTalk orchestration with an expression. The expression has the following:
construct msg_mymessage { msg_mymessage = msgInputXML; }
msgInputXML and msg_mymessage use the same schema, same message type and both show up under the Messages in Orchestration view.
After the expression I have a Construct Message and in the Construct message I have a Transform that uses msg_mymessage as a source and some other message as a destination.
I'm getting the errors: use of unconstructed message 'msg_mymessage' 'msg_mymessage':message has not been initialized in construct statement
I'm not sure why I get this error. What should I be looking for?
Upvotes: 1
Views: 15730
Reputation: 5
In your constructed messages shape, you need to define the message type you are going to create. when you drop the shape, the drop down dialog will ask you what type of message you are constructing. You can select more than one. so if you happen to have a message checked that isnt being constructed in this shape, you will get this exact message also.
Upvotes: 0
Reputation: 2845
My guess is that you didn't construct msg_mymessage
in earlier shapes.
Check the blog article Constructing BizTalk 2004 XML Messages (In an Orchestration) - Choices which demonstrates several ways to construct a message in BizTalk .
Upvotes: 0
Reputation: 107247
Make sure that you use an assignment shape (inside a construct message wrapper) when you create msg_mymessage. Then just copy the code in the expression shape (msg_mymessage = msgInputXML;)
http://msdn.microsoft.com/en-us/library/ee253499(v=bts.10).aspx
Upvotes: 2
Reputation: 9478
Do you need to do,
msg_mymessage = new System.Xml.XmlDocument();
Upvotes: 1