1

I have a scenario where client drop an XML and a .FINISHED file. Client create the .FINISHED file once it’s finishes writing XML file. Both file have same name. As you can see, I can’t start reading .XML before .FINISHED created. Once XML copied to target I like to delete both files from the client location.

It looks very typical problem but I think SFTP and SSO have made it non-typical.

I am developing on BizTalk 2009 using /n software SFTP Adaptor for BizTalk with SSO for authentication.

Notes:

  • I have to use SFTP as I can’t use FTP protocol.

  • There are some solutions I have Googled and tried but all are FTP based and/or using Correlation.

  • I have to use SSO for managing credentials.

  • software SFTP Adaptor provides the feature to use SSO and it is working fine under normal scenario where I have to read/write without waiting for .FINISHED file.

I have used following approaches:

Correlation – Parallel/Sequential

  • After spending some time I realised that I can’t use Correlation as I have to wait for .FINISHED file before start reading .XML. Client starts writing XML first and then FINISHED

  • When I drop the .XML receive location picks the file without waiting for .FINISHED and Orchestration through exception depending upon situation.

    For this solution I have got help from following blog

    http://www.paulvanbrenk.com/blog/CategoryView,category,BizTalk.aspx

Please correct me if I have wrong understanding.

Using a .Net Component to Get the XML File from SFTP location once .FINISHED received:

Another possible solution is to change Software or any other SFTP Adaptor’s receive location or URI within Orchestration at runtime i.e. initially set it to .FINISHED once received change it to .XML and get it.

Don’t know how to achieve it but is it possible within orchestration??

4

2 回答 2

3

/nsoftware SFTP 适配器的另一个选项是使用 MonitorFileGrowth 设置。

这会记录轮询间隔之间的文件大小,并且在文件停止增加之前不会尝试下载文件(因此不再写入文件)。您可以在适配器的 Other 属性中设置它,例如:

MonitorFileGrowth=true

或者,如果您可以控制在服务器上创建文件的过程,使用与您的 FileMask 不匹配的文件的临时扩展名(因此接收位置不会尝试下载它)也可以工作。

或者,如果您想像 Fabio 所说的那样等待 .FINISHED 文件,您可以将接收位置配置为仅查找 .FINISHED 文件,并且一旦在您的编排中收到,使用发送适配器按照本文下载 XML 文件:http ://www.nsoftware.com/kb/showentry.aspx?entry=09170901

于 2012-01-30T22:23:06.980 回答
1

为什么不将接收位置设置为仅激活以 .FINISHED 结尾的文件。然后编写你的编排去获取相应的 XML 文件——这可行吗?

于 2012-01-30T08:55:57.737 回答