cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP adapter sending additional file

former_member214137
Participant
0 Kudos

Hi,

I have a requirement to send a file, preferably the file name will contain a timestamp, via the sftp adapter and after the file has been successfully sent send 0 size file of the the same name as the first file but with a different extension. The second file acts as flag to the receiver that the first file has finished being sent and is ready to be processed.

I don't need to do any mapping as the file to send is already created as needed, so I would be using the dummy interface to just pass the file through as is. The sftp adapter doesn't have command line options like the file adapter that I could have utilized to spawn the second file which would be picked up and sent by a second sftp comm channel.

Any suggestions as to what is the best way to spawn the second file?

regards

Julian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I had a requirement similar to this several years ago.  i used a BPM to process the main file and cope the filename into a variable then when that was complete, i wrote an empty file with the same name and _EMPTY tag at the end.

it worked fine.  weird requirement, but fulfilled.

Answers (1)

Answers (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi,

It's also may be possible to do this without BPM if you extend either a receiver determination or interface determination to have two target interfaces and you don't specify any conditions (the system would then forward the source message on to all recipients).

Regards,

Ryan Crosby

Former Member
0 Kudos

But that wouldn't work in all cases as the OP has to wait until after the file has successfully be sent. 

it depends on the size of the files.

Ryan-Crosby
Active Contributor
0 Kudos

That's correct as far as the receiver determination but you can specify "maintain order at runtime" for the interface mapping and designate that the 0 byte file be the last interface mapping (I have a sneaking suspicion that this actually works in receiver determination too even though there is no option).