Tuesday, November 15, 2011 2:08 PM
For some reason I cannot understand what I'm doing wrong, or my understanding of property promotion is missing some key information.
Scenario: In BizTalk 2009, I have a receive location using File adapter to receive delimited flat files. I'm using a pipeline on the receive location that contains the default Flat File Dissassembler with the flat file schema. The received file gets dissassembled into an XML message that is then processed by an orchestration.
Problem: Everything works except that I cannot access the FILE.ReceivedFileName -property in the orchestration. Looking at the message properties in tracking the property is not promoted.
What am I missing here?
My understanding is that the File Adapter should promote the FILE.ReceivedFileName and Flat File Dissassembler should keep it.
Interesting part is that if I add a Map that just maps the XML-message to the same schema (just copy message), the property gets promoted.
Is my only choice to create a custom pipeline component for the pipeline to promote the property?*
Tuesday, November 15, 2011 2:41 PM
The File adapter will WRITE (Not Promoted) not PROMOTE (Promoted) the file.ReceivedFileName property to the context.
This means that no property schema is available for the property and you cannot access it by using msg(File.ReceivedFileName) in an orchestration.
A custom pipeline component will be able to read it, and file/ftp send adapters will be able to access it through %SourceFileName%
Morten la Cour
Tuesday, November 15, 2011 10:00 PM
In the end I figured this out and the file adapter was indeed providing the FILE.ReceivedFileName context property.
The problem was that I forgot that FILE.ReceivedFileName contains the file path + filename.
My orchestration threw an error because I was trying to parse the filename but did not realise that it included the path also.
Thx for the help anyway!
- Marked As Answer by DotNetLarry Tuesday, November 15, 2011 10:00 PM