Flat file dissassemblers in BizTalk exposes the document schema property differently than XmlDissassmbler.
Flat file dissassmblers do not allow for multiple schema selections. You can only select 1 flat file schema.
The next option to go for is to use multiple flat file dissassemblers as you can have 0-255 components and it works with first match execution. However in practise this does not work like this and the given input only tries to match the first configured schema and hence can’t be used in scenarios where you want to have multiple schemas.
The second way is to separate out your receive locations and use separate pipelines but this can be an issue if the sending system generates the files for you as a single process and would like to send different files at the same locaion for the middlerware to handle.
To solve this need, the SDK comes with a SchemaResolver component that works on reading the content [First few characters] and determining what schema to use.
For a similar scenario, I wanted to have this based on the received file name.
We can read the file name and use the specified messagetype for schema resolving.
The DocumentSpec is retrieved use the messgaetype and written to context for dissassmbler to probe the related schema.
This is a very handly solution to have single receive for multiple flat files.