BizTalk Server General - Simple(?) question: Copy instead of move

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2004 > Simple(?) question: Copy instead of move





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Simple(?) question: Copy instead of move
Bj?rn Jansson

2004-11-10, 2:47 am

Hi,
I want to use the file adapter to get files from a folder. I also want
to keep the original file in the folder, but BizTalk deletes the file
when it processes it.
How do I keep the original file?
Hugo Rodger-Brown

2004-11-10, 2:47 am

You'd have to rewrite the file with a different filename (or extension) so
that the FILE adapter didn't pick the new file up. Adapters are (basically)
stateless - so they don't keep any information about which files they pick
up - they just pick up everything that matches the mask. If the adapter
didn't delete the file it would get into a recursive loop.

Best bet might be to use content-based-routing - set up a send port that
subscribes to the receive port (using the BTS.ReceivePortName filter), and
then writes out the file with a different extension. Note that you'll lose
any file naming convention when you do this, unless you write a custom send
pipeline.

Hugo
http://hugo.rodger-brown.com


Hugo Rodger-Brown

2004-11-10, 7:47 am

Just found this - allows you to control the name of the output file.

Thanks to Peter Himschoot

http://blog.u2u.info/DottextWeb/pet.../11/09/319.aspx


Greg Forsythe

2004-11-10, 7:47 am

To rename a file after processing set the following Registry Key.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl
Set\Services\BTSSvs{GUID}\RenameRece
ivedFiles

docs at:
http://msdn.microsoft.com/library/d...t_file_owbo.asp


Greg


"Bj?rn Jansson" <bjansson@passagen.se> wrote in message
news:bc454614.0411100110.3b4590c9@posting.google.com...
> Hi,
> I want to use the file adapter to get files from a folder. I also want
> to keep the original file in the folder, but BizTalk deletes the file
> when it processes it.
> How do I keep the original file?



Greg Forsythe

2004-11-10, 7:47 am

Forget my last post. The rename is temporary while the file is being
processed. This won't work for you.

The content-based routing scenario from Hugo has limitations as the new file
is the output of the pipeline so any disassembly or mapping will change the
file.

The best bet would be a custom file adapter, you could start with the one in
the SDK or a decode pipeline component (must run before any disassembly)
that archived the file. This blog entry could be helpful;
http://weblogs.asp.net/gzunino/arch.../12/181337.aspx

Greg



"Bj?rn Jansson" <bjansson@passagen.se> wrote in message
news:bc454614.0411100110.3b4590c9@posting.google.com...
> Hi,
> I want to use the file adapter to get files from a folder. I also want
> to keep the original file in the folder, but BizTalk deletes the file
> when it processes it.
> How do I keep the original file?



PBR

2004-11-10, 5:48 pm

What would be the point of that? Any adapter would just try to keep
retreiving the left-behind file over and over endlessly.


"Bj?rn Jansson" <bjansson@passagen.se> wrote in message
news:bc454614.0411100110.3b4590c9@posting.google.com...
> Hi,
> I want to use the file adapter to get files from a folder. I also want
> to keep the original file in the folder, but BizTalk deletes the file
> when it processes it.
> How do I keep the original file?



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com