BizTalk Server General - immutable messages

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > August 2005 > immutable messages





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author immutable messages
Bajka

2005-08-26, 5:55 pm

My orchestration has about 20 receive and send shapes. All of them are
receiving and sending messages with same schema but different content. As I
can reed on some websites messages are immutable in BizTalk Server 2004. It
means that I should create new message every time I need to change content
of received message.
Now I don't do so. I don't want to have to much messages created if it's not
necessary. I have only one message and I use this piece of code in 'Message
Assignment' every time I need to change it's content:
xDoc.LoadXml("<ns0:Email
xmlns:ns0=\"http://Doc.Body\"><Body></Body></ns0:Doc>");
email=xDoc;
email.Body="XY";
I use this way to avoid error: "Use of unconstructed message"

It seems that orchestration is working as I need. But documentation says
that "after a message is constructed, it cannot be changed".
Is there any hidden problem which can appear later? Or if I have no error,
can I change constructed/received message as I do it now and don't care about
immutability of messages?
Thanks
Scott Colestock

2005-08-26, 5:55 pm

Having a loose schema in place (or using completely untyped ports via
XmlDocument) such that the structure of the message content can vary greatly
is a different issue than what the documentation is referring to.

The documentation is simply saying that the contents of a given message
instance cannot change after it has been received or constructed within an
orchestration.

Scott Colestock
www.traceofthought.net



"Bajka" <Bajka@discussions.microsoft.com> wrote in message
news:7CE95E4B-52E8-40AA-BCD7-8E5C5AA123DB@microsoft.com...
> My orchestration has about 20 receive and send shapes. All of them are
> receiving and sending messages with same schema but different content. As
> I
> can reed on some websites messages are immutable in BizTalk Server 2004.
> It
> means that I should create new message every time I need to change
> content
> of received message.
> Now I don't do so. I don't want to have to much messages created if it's
> not
> necessary. I have only one message and I use this piece of code in
> 'Message
> Assignment' every time I need to change it's content:
> xDoc.LoadXml("<ns0:Email
> xmlns:ns0=\"http://Doc.Body\"><Body></Body></ns0:Doc>");
> email=xDoc;
> email.Body="XY";
> I use this way to avoid error: "Use of unconstructed message"
>
> It seems that orchestration is working as I need. But documentation says
> that "after a message is constructed, it cannot be changed".
> Is there any hidden problem which can appear later? Or if I have no error,
> can I change constructed/received message as I do it now and don't care
> about
> immutability of messages?
> Thanks



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com