hosir
hosir

Reputation: 477

Biztalk copy the original flat file to another folder after passing the flat file disassember component

We have built a custom pineline component using a flat file disassembler. The main purpose of this flat file disassembler is for flat file validation using the flat file schema.

Our purpose is: once the flat file received in receivelocation pass the flat file disassember (which mean the file format is correct), we would like to copy the original flat file (NOT the disassembled XML file) to another folder.

We have built a custom pipeline component for file copying, but if we place this component AFTER the flat file disassemblr component, we can only backup the disassembled XML file, not the original flat file.

Any idea how can we archive our purpose?

Thanks a lot.

Upvotes: 1

Views: 1504

Answers (2)

Silampathy G
Silampathy G

Reputation: 11

I found an another approach while googling for the same issue..Instead of using custom pipeline component I found this approach very easy and useful..

here are the steps :

create Folders ReceiveIN,IN,Archive,OUT

  1. Create a receive port say ReceivePortIN for folder ReceiveIN
  2. Create a receive location for the above port with passthorugh pipeline
  3. create another receive port IN for folder IN
  4. Create a receive location for the above port with the respective pipeline selected ..say if its a flat file then a flat file disassembler pipeline.
  5. Create a Send Port for the folder Archive and Create a Send Port for the folder IN
  6. Filter through receive Port name "ReceivePortIN" and pipeline is passthrough. the file name could be given as %SourceFileName%' which outputs the file with the same file name as received for both the send ports 7.thus a copy of the file is archived before sending to your IN folder

Courtesy :https://blog.tallan.com/2010/03/26/biztalk-file-backup/

thanks &regards Silam

Upvotes: 1

Vikas Bhardwaj
Vikas Bhardwaj

Reputation: 1510

You have two options: 1 - Either copy the original file irrespective of whether flat file disassembler fails or pass. for this case you can use a decode stage pipeline component. This will be helpful for debugging when disassembler fails. 2. If your requirement is only to save the message after flat file disassembler, simpler solution is to create a send port with Flat file assembler which receives the disassembled xml and again converts it to flat file and send it another folder in addition to other processing.

Upvotes: 0

Related Questions