cancel
Showing results for 
Search instead for 
Did you mean: 

Pulling the file

vijay_b4
Active Contributor
0 Kudos

Hi,

I want to receive an alert or some kind of notification when sender adapter is trying to pull the file and the file does not exist. Its not a failure, but if the file does not exist in the sender directory, wanted to receive some kind of notification. Is that possible?

Thank you,

Vijay.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182412
Active Contributor
0 Kudos

Hi Vijay,

Check this blog.

Regards,

Praveen.

vijay_b4
Active Contributor
0 Kudos

Hi Praveen,

Thank you for the blog,its really helpful....but I think its very difficult way to do it...anyways I will give a try and see..

Is there any other way?

Regards,

Vijay.

vijay_b4
Active Contributor
0 Kudos

Hi Praveen,

I saw the blog and have a doubt, the blog says about pulling the file from NFS, what about if I want to pull the file from FTP or SFTP? and before running the main scenario, I have to run this scenario and how the main scenario and this scenario will be linked? is it once I receive a mail(with file or no file), then I have to manually run the main scenario?

Regards,

Vijay.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Vijay,

                Here are answers to your query

1. what about if I want to pull the file from FTP or SFTP?

ans) Change the script to check from ftp/SFTP location instead of NFS

2) before running the main scenario, I have to run this scenario and how the main scenario and this scenario will be linked?

ans) They are not linked. Suppose there is no file in a day for the main scenario then you will receive mail from the admin scenario which is checking for the file (mail says file not present). If there is a file picked up by main scenario then admin scenario will send a mail with different topic(file picked up).

3)  is it once I receive a mail(with file or no file), then I have to manually run the main scenario?


ans)  The main scenario is running once a day  (availability time planning) then you need to manually run it depending on content of the mail. The sender needs to put the file in source directory for PI to pick up the file. If your main scenario is always polling for the file then manual restart of sender channel is not necessary.


some thoughts on the post and suggestion

------------------------------------------

1. How will you know if the commands within script has executed or not? Channel log will show script executed but it will not show if the individual commands within script has executed properly or thrown errors.


2.  Other way round is to design a simple file to mail scenario (say scenario check). This scenario will poll only once a day in the archive folder of main scenario. If the main scenario has processed a  file, the file must be in archive directory for the day.  This check scenario will send a mail only if a file has been processed to the sender. If sender do not receive any mail for a day, they need to check and put file in source directory where PI has been polling for the file.



Regards

Anupam