| Gilles [MSFT] 2004-07-28, 8:46 pm |
| Hello,
> Biz talk 2004 question
>
> I have a lot of files coming in to a folder which needs to be renamed during an orchestration. Something like
>
>Incoming FTP --> FileRename (Some business Logic for renaming) --> Flat File Adapter -->
>parse to XML --> use SQL Adapter -- > load to DB
>
>I got the later part working.. (Flatfile -> XML-> DB)... I am stuck at renaming the file as Biztalk handles everything as XML Messages.
>
>I tried to write a C# code (that looks in to a folder and renames the files according to business logic) and added it as a refernce to the Biztalk project and
tried calling it in expression editor... I had System.IO.File as Message... (Looks like this is not possible as it is not serializable)...
>
>Basically what I want to acheive is when ever a file comes in to the folder... I need to rename the file using a C# function which applies the business logic...
As I am sure you are aware, the file name is a property that is carried with the message. You can easily implement a custom pipeline component
(a custom decoder) that will alter the property according to your business logic. Evertything in the pipeline will read the file name from the property
you altered and you will be fine. The SDK contains "FixMsg", a custom pipeline sample.
The chain becomes: Incoming FTP --> FILE Adapter --> Custom pipeline component (rename file) -> parse to XML --> use SQL Adapter -- > load to DB
Thanks.
-Gilles.
|