Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm having problems in a job that aims to take different "xml" files from a local directory and send them to a SFTP server.
The problem is that when I run the job I don't get any kind of error. The TFTPPut component theoretically works fine but does not really send the files to the SFTP server. It is very strange because I don't get any permissions error, or that the files are not found.
Tried debugging the job but couldn't understand where the actual problem is.
!Relational.ISNULL((((String)globalMap.get("tFileList_2_CURRENT_FILE"))))
I have added a Tjava after the tFTPPut component with the following print:
1)System.out.println((((String)globalMap.get("tFTPPut_2_CURRENT_STATUS")));
2)System.out.println(((String)globalMap.get("tFTPPut_2_TRANSFER_MESSAGES")));
3)System.out.println((((String)globalMap.get("tFTPPut_2_ERROR_MESSAGE"))));
I get this answers for this 3 prints:
1) No file transfered.
2) 50 files have been uploaded.
3)/public/CicleAigua/ATLL/ATLL_LIMS_in/*_ACA.xml (where there is the path of the SFTPServer / Filemask
Thanks in advance for any kind of help and let me know if more information is required for this.
Job Capture
tFTPPut component
Hi
You are using tFileList to iterate each file, so you should set the current file name in the FileMask field of tFTPPut2,
(String)globalMap.get("tFileList_1_CURRENT_FILE")
and change the job to:
...tFileList--iterate--tFTPPUT2.
use iterate link instead of runIf, otherwise, it will only put the last file.
If you don't use tFileList in the job, just set the filemask as "*_ACA.xml" to match all files, check the 'Use Perl Regex....' box.
Regards
Shong
Hi,
As you said, I've changed the FileMask field of the tFTPPut2 with the current file name (String)globalMap.get("tFileList_1_CURRENT_FILE"). I've added to an "Iterate" between the tFileList_1 and tFTPPut_2.
The problem is almost solved, but I still have a problem. Some of the file names contain the character "(" and ")". Because of this, in the iteration, the variable (String)globalMap.get("tFileList_1_CURRENT_FILE") doesn't get the name right and fails. I get the error "No matches found for (the name of the file containing parentheses).
Do you know how I could avoid the issue of this type of character in filenames?
Thanks in advance for any kind of help and let me know if more information is required for this.
Job capture:
tFTPPut component: