| Gilles [MSFT] 2004-07-15, 5:50 pm |
| Hello,
>We will be receiving many variations of a flat file message document. As part of that process we will need to interpret the first 12 characters of the flat
>file. Depending on the code, the corresponding schema will be chosen. One approarch was to add settings in the machine.config file. Something
>similar to this:
>
> <appSettings>
> <add key=" FH32" value="http://TransactionBroker_BG.schCIS_FH32_FF_BG#FH32" />
> <add key="CISUnknownMessageType" value="http://TransactionBroker_BG.schCIS_Generic_FF_BG#CISGenericMessage" />
> <add key="CISMessageTypeIndicatorLength" value="12" />
> </appSettings>
>
>Is this a good design choice or is there a more appropriate place to put this type of code?
I would suggest you write a csutom disassembling pipeline component which exposes a collection of name/values pairs as properties.
Your component can then look at the first 12 bytes, emit the right XML and promote the right namespace so further processing can be done.
As far as your config values are concerned, you can expose them as properties of your cusotm pipeline (collection of name/value pairs).
They will be stored with the pipeline component properties (in Biztalk config db) and you will be able to change them at runtime, using WMI.
Thanks,
-Gilles.
|