| Alan Smith 2004-08-03, 2:47 am |
| Hi,
This is because in the second construction shape, the message is constructed again (e.g. it looses the data that was set in the first construction shape. If you then try to set one of the fields, you will be attemting to access an unconstructed message.
One option is to perform both the operations in the same construction shape, as you will then perform the transform to assign the message values, then modify them.
Another option is to decalre another message (e.g. msgB), and use the second sonstruction shape to construct it, and assign it like this:
msgB = msgA;
msgB.Field = someValue;
Regards,
Alan
--
BizTalk & .net
Consulting Training Mentoring
Stockholm London Europe
See aboutme for contact info
"Marcus" wrote:
> I am confused about the visibility and the lifecycle of messages defined in an orchestration.
> I have a message (let’s call it msgA) of a complex type (C# data class expressed as XML document) that is to be passed to a Web service. Message is constructed in a construction shape using a transformation. In the very next step, in another construct
ion shape (created as intermediate step for debugging reasons) I am trying to set one of the fields of this message to a value acquired from another Web service invoked before the first construction shape. Compiler complains that “’msgA.messagePart’
: message part has not been initialized in construct statement”. How is that possible if the message was constructed in the previous construct shape through a transformation?
>
> I am not getting this error if assignment is done in the same construction block with the transformation. I appreciate that somebody puts some light on this case.
>
> Thanks.
>
|