cancel
Showing results for 
Search instead for 
Did you mean: 

FTP from custom adapter module on sender File adapter

Former Member
0 Kudos

Hi Experts,

We have a requirement where we need to first try pick up a file from a primary location (shared folder), if the primary location is not available or file is not present there, then try to pick the file from a secondary location (shared folder). If both the locations are unavailable, we need to generate an alert and then again repeat the process till the file becomes available.

The client is reluctant to use a script to do this, so what we are thinking of is to pick a dummy file from a temporary location and then from a custom adapter module try and poll the primary and secondary locations till the file becomes available.

I tried searching anything on doing ftp from a custom adapter module in sender file adapter (using PI 7.1), though found a few references to this, could not find anything concrete to suggest that this is possible and if so how.

Any ideas on this would be extremely helpful.

Regards,

Shiladitya

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

This can be achieved from an adapter module but design not recommended by SAP

prasannakrishna_mynam
Contributor
0 Kudos

Hi,

In custome module you can access files located in ftp. You can use java.io.* library to achive this and need to check the primary and secondary locations based on condition. Though you can try this approach,it is complex. BPM is the better for this scenario as you need to poll until the file is available.

try with the first pattren in the following blog.

/people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

Regards,

Prasanna

Shabarish_Nair
Active Contributor
0 Kudos

the best in your case is to have two file adapters polling in the locations and having a BPM that will have two receive steps that can trigger the start of the processing.

http://help.sap.com/saphelp_nw04/helpdata/en/cb/15163ff8519a06e10000000a114084/content.htm

via that design, you can handle your requirement quite easily. make sure you handle exceptions in the BPM

prateek
Active Contributor
0 Kudos

Adapter module can't pick a file. You need custom adapter to pick it.

But the point is, why are you planning to use modules. The design could be best acoommodated in a BPM.

Regards,

Prateek