03-22-05 11: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/
[ Post a follow-up to this message ]
|