| Author |
Implementing locking files with BizTalk
|
|
| Fergal 2005-09-09, 2:48 am |
| I need to receive flat files from a legacy system into BizTalk.
However before I can read the files I must check that the directory is not
locked by the legacy system, this is done my making sure a file called
‘LegacyLock’ doesn’t exist in the directory. If the lock exists I have to
wait till it is cleared.
Furthermore I have to place my own Lock file ‘BizTalkLock’ in the directory
before consuming the files and remove it afterwards.
How can I achieve this with BizTalk 2004 or 2006?
| |
| Alan Smith 2005-09-09, 2:48 am |
| Hi,
I don't think this is supported by out of the box in 04 or 06.
One option would be to build a custom adapter with the logic to handle the
locking files. It's not an easy task, but if you have good .net coding
skills, you should be able to pick it up quite quickly. There's an adapter
wizard to get you started, and a whitepapers on adapter development oin MSDN.
A second option may be to use another application (e.g. Windows service) to
handle the locking and file transfer, and copy the files to a location where
BizTalk can process them.
Regards,
Alan
--
The Bloggers Guide to BizTalk
http://geekswithblogs.com/asmith
"Fergal" wrote:
> I need to receive flat files from a legacy system into BizTalk.
>
> However before I can read the files I must check that the directory is not
> locked by the legacy system, this is done my making sure a file called
> ‘LegacyLock’ doesn’t exist in the directory. If the lock exists I have to
> wait till it is cleared.
>
> Furthermore I have to place my own Lock file ‘BizTalkLock’ in the directory
> before consuming the files and remove it afterwards.
>
> How can I achieve this with BizTalk 2004 or 2006?
>
| |
| McGeeky 2005-09-09, 7:49 am |
| Out of interest, what is the reasoning behind this locking stategy? And how
are you retrieving the files from the legacy system, through FTP or the file
system?
--
McGeeky
http://mcgeeky.blogspot.com
"Fergal" <Fergal@discussions.microsoft.com> wrote in message
news:A3F2E4F3-D9E7-4360-BD53-44FE1DB7017A@microsoft.com...
>I need to receive flat files from a legacy system into BizTalk.
>
> However before I can read the files I must check that the directory is not
> locked by the legacy system, this is done my making sure a file called
> 'LegacyLock' doesn't exist in the directory. If the lock exists I have to
> wait till it is cleared.
>
> Furthermore I have to place my own Lock file 'BizTalkLock' in the
> directory
> before consuming the files and remove it afterwards.
>
> How can I achieve this with BizTalk 2004 or 2006?
>
| |
| Scott Colestock 2005-09-09, 5:52 pm |
| If this really has to be the semantic for interacting with this system, I
would consider writing a custom .net service that uses a file system watcher
(looking for presence/absence of 'LegacyLock'), and copies the files to
another directory that BizTalk is actually listening to at the appropriate
time.
Scott Colestock
www.traceofthought.net
"Fergal" <Fergal@discussions.microsoft.com> wrote in message
news:A3F2E4F3-D9E7-4360-BD53-44FE1DB7017A@microsoft.com...
>I need to receive flat files from a legacy system into BizTalk.
>
> However before I can read the files I must check that the directory is not
> locked by the legacy system, this is done my making sure a file called
> 'LegacyLock' doesn't exist in the directory. If the lock exists I have to
> wait till it is cleared.
>
> Furthermore I have to place my own Lock file 'BizTalkLock' in the
> directory
> before consuming the files and remove it afterwards.
>
> How can I achieve this with BizTalk 2004 or 2006?
>
| |
| Fergal 2005-09-11, 2:47 am |
| I don't know the reason behind the locking stategy! The legacy system comes
from a third party and I don't have a decent API for it. The locking strategy
comes from their documentation.
"McGeeky" wrote:
> Out of interest, what is the reasoning behind this locking stategy? And how
> are you retrieving the files from the legacy system, through FTP or the file
> system?
>
> --
> McGeeky
> http://mcgeeky.blogspot.com
>
>
> "Fergal" <Fergal@discussions.microsoft.com> wrote in message
> news:A3F2E4F3-D9E7-4360-BD53-44FE1DB7017A@microsoft.com...
>
>
>
| |
| McGeeky 2005-09-11, 7:47 am |
| I just wonder wether you have to honour that locking strategy. Can you not
just put and get your files from the folder regardless? Or will it
definitely have a negative impact on the legacy system?
--
McGeeky
http://mcgeeky.blogspot.com
"Fergal" <Fergal@discussions.microsoft.com> wrote in message
news:10FEE80F-8CEB-4E68-9D5F-F6E085E9155B@microsoft.com...
> I don't know the reason behind the locking stategy! The legacy system
comes
> from a third party and I don't have a decent API for it. The locking
strategy[vbcol=seagreen]
> comes from their documentation.
>
>
> "McGeeky" wrote:
>
how[vbcol=seagreen]
file[vbcol=seagreen]
not[vbcol=seagreen]
to[vbcol=seagreen]
| |
| Fergal 2005-09-12, 6:07 pm |
| I have done tests ignoring the locking strategy and I didn't experience any
problems. However I would much rather play it safe that sorry.
"McGeeky" wrote:
> I just wonder wether you have to honour that locking strategy. Can you not
> just put and get your files from the folder regardless? Or will it
> definitely have a negative impact on the legacy system?
>
> --
> McGeeky
> http://mcgeeky.blogspot.com
>
>
> "Fergal" <Fergal@discussions.microsoft.com> wrote in message
> news:10FEE80F-8CEB-4E68-9D5F-F6E085E9155B@microsoft.com...
> comes
> strategy
> how
> file
> not
> to
>
>
>
|
|
|
|