Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a job that tries to pick up a file from our sftp site every morning. I would like to detect if the file is missing.
The tFTPGet onSubJobOK connects to a fileInputDelimited component. As long as the file is there, it works fine.
I connected a tSendMail component that is connected to the OnComponentError of the tFTPGet and should send the error via email using ((String)globalMap.get("tFTPGet_1_ERROR_MESSAGE"))
Unfortunately, when I run the job and the file is missing, it always seems to return OK not error (even though I can see the job returning "the system can't file the file specified".)
Any idea what I'm doing wrong?
TIA.
"OnComponentError" will only trigger if the component itself fails (e.g. the connection to the ftp site gets closed, or something along those lines). Even though that file was not found, the component still executed successfully. If you're looking to see if a specific file name was processed, you could use the tFTPFileExist component, then check the global var ((Boolean)globalMap.get("tFTPFileExist_1_EXISTS"))
"OnComponentError" will only trigger if the component itself fails (e.g. the connection to the ftp site gets closed, or something along those lines). Even though that file was not found, the component still executed successfully. If you're looking to see if a specific file name was processed, you could use the tFTPFileExist component, then check the global var ((Boolean)globalMap.get("tFTPFileExist_1_EXISTS"))
Ah, OK. That makes sense. Thank you I'll try your suggestion.
Thanks, the first solution got the job done, but I'll keep that in mind.