Home Page › Forums › BizTalk 2004 – BizTalk 2010 › RecievedFileName
- This topic has 2 replies, 1 voice, and was last updated 9 years, 7 months ago by
community-content.
-
AuthorPosts
-
-
June 3, 2008 at 5:54 PM #19841
Hi,
I have a xml file from a vendor with no namespaces which is mapped to a comapny message schema and the data is massaged.
Part of the process requires that the new xml file be logged into the DB along with the originalfilename as part of the xml.
A xml node exists for the same in the message schema.
During the mapping process i am leaving this node in the schema as nilHow do i assign the FILE.RecievedFileName system promoted property to this xmlnode before sending it to the DB ?
Is there a way to use maps to do this?
Can this be done in the pipeline somewhere to assign the recievedFilename to the xml message ?
Won’t the maps run after the pipeline stage?What (or where is) the cleanest way(place) to do this ?
-jerry
-
June 3, 2008 at 6:43 PM #19842
There are a number of ways to do this:
1. use xpath function: xpath(DBMessage, “xpath to appropriatenode”) = InputMessage(FILE.ReceivedFileName);
2. Make the node in the DB message a distinguished field DBMessage.InputFileName = InputMessage(FILE.ReceivedFileName);
3. Create you own property schema, add a property called InputFileName, promote the appropriate node in the DBMessage to this property: DBMessage(Custom.InputFileName) = InputMessage(FILE.ReceivedFileName);
4. Promote the appropriate node in the DBMessage to the FILE.ReceivedFileName property: DBMessage(FILE.ReceiveFileName) = InputMessage(FILE.ReceivedFileName);
All of these mechanisms require you to create the node in the DBMessage instance.
The last option is probably the best approach, all the work can be done in the pipeline and you do not need an orchestration.
If you put your map in the pipeline (this is the last thing performed before the message is published to the messagebox db) the mapped DBMessage instance will assume all the properties of the input message and the XML Assembler will demote the FILE.ReceivedFileName into the message.
-
June 10, 2008 at 9:26 AM #19888
Thanks Greg!
I went with option 2
DBMessage.InputFileName = InputMessage(FILE.ReceivedFileName);as DBMessage is a mapped Message and is only available after the receive pipeline processing is done and it is mapped from the InputMessage.
-Jerry
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.