This one is driving me mad.
I have a message in my orchestration of type MessageEnvelope (a simple schema in my project)
I have a simple orchestration with a construct message shape. This construct message constructs this message.
Inside this shape is a Message Assignment shape which contains the following code:
messageEnvelope.Action = "";
messageEnvelope.MsgType = "Test";
messageEnvelope.SystemID = "System A";
messageEnvelope.BodyXML = "Some test text";
Each of these is a Distinguished Field on the message type schema. All elements of this schema are distinguished and assigned in the above.
Compiling the project gives an "use of unconstructed message" for each assignment statement above and also a "message has not been initialized in construct statement" error.
Can anyone point out why BizTalk cannot initialize and construct this message?
Just setting distinguished fields actually doesn't construct the message. The primary ways that a message is constructed are:
Maybe in your case you can just use the message that starts your orchestration as part of a map to create the MessageEnvelope.
Thanks for this.
I am using a map now to construct the message.
One question. In a map, is it possible to map a complete document from the source side into a single node in an envelope schema on the destination side? Would the destination side body be an xs:any element?
Thanks for your time.
Believe me . .
Yes U can use the Mass Copy Functiod...!
I have a similar problem (it seems). In an orchestration, I receive a flat file with all fields promoted. After that, I insert a Message Assignment shape. In the additional Construct shape, I enter the name of a message I have constructed earlier, msgOut. Next, I enter the following line
msgOut(FILE.ReceivedFileName) = msgOut.Record.Param1;
Upon building, it refuses this with the dreaded "unconstructed message" .
What did I do wrong?