BizTalk Server Orchestration - assigning value to a message

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > March 2005 > assigning value to a message





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 assigning value to a message
Chad

2005-03-22, 6:03 pm

I am having trouble assigning a value to a message. I have a some data
which has been mapped to a schema that is assigned to a message. In my
orchestration I insert some other data to sql and have the identity
value returned. I then want to take that identity value and assign it
to an empty value in my message. Which will eventually act as a
foreign key id for the message data which will be inserted. Can anyone
explain to me how to do this. I have tried using a message assignment,
but I get a build error stating "use of unconstructed message".

Basically, I'm trying to take values from 2 different schemas and map
them into one schema. Any experience with this?

Tomas Restrepo \(MVP\)

2005-03-22, 6:03 pm

Chad,

> I am having trouble assigning a value to a message. I have a some data
> which has been mapped to a schema that is assigned to a message. In my
> orchestration I insert some other data to sql and have the identity
> value returned. I then want to take that identity value and assign it
> to an empty value in my message. Which will eventually act as a
> foreign key id for the message data which will be inserted. Can anyone
> explain to me how to do this. I have tried using a message assignment,
> but I get a build error stating "use of unconstructed message".
>
> Basically, I'm trying to take values from 2 different schemas and map
> them into one schema. Any experience with this?


Remember that messages are immutable in orchestrations, so what you want to
do is create a new message, and put in it data coming from the two original
messages. You can do this easily with a transformation from the two source
messages to the final one within a Construct Message Shape (you can do *-*
transformations using maps within orchestrations).

One trick I've also used is doing a map to create a partial message, then
filling in the rest of the fields using a Message Assignment shape to set
the rest of the fields using code (for example, from orchestration
variables). This works as long as you put both the transform and the message
assignment shapes within the same Construct Message shape.

--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/


Chad

2005-03-23, 7:47 am

Thanks Tomas...I have been using biztalk for months now and didn't even
realize I could map 2 schemas from source. That was an easy solution.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com