Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings,
Here's the issue, I want to iterate the "add" folder for .dcm file creations, then http post each .dcm file (files will be served in subdirs in the "add" folder) and after this action has been done for every file that has been posted, it has to be moved using tFileCopy to the "processed" folder, I repeat, only if the file has been http posted before. Problem is that I can't find a way to move the file while bringing its parent subdir that has been served as well. For example, a subdir named "test" that contains 0001.dcm and 0002.dcm will be pasted in "add" folder, tWaitForFile will trigger the next steps, but in the end, these files will end up in "processed/0001.dcm" and
"processed/0002.dcm" instead of "processed/test/0001.dcm" and "processed/test/0002.dcm" respectively, plus "add/test" folder will still exist as empty. I would also like the proccesed files to be contained under "/proccesed/140122", for example the current date 14-01-22, so a dynamic folder naming.
I've tried other work-arounds, such as Java code or tFileList component and
((String)globalMap.get("tFileList_1_CURRENT_FILE") as input of the tFileCopy but that makes files to be moved before the tHttpRequest occurs.Any pointers?
Thanks in advance!
There are several issues here. First of all, what are you trying to do with the tHttpRequest component? Do you have a web service running on your local machine? This looks like you are trying to send the contents of the files somewhere. This is not what this component does. This component config is used to send POST params held in the file.
Hey Rhall,
Thanks for your reply,
"Do you have a web service running on your local machine?" Yes, that's correct.
Could you please propose a proper work-around for the use-case? I'm new to Talend, so please provide me some extra details.
Thank you!
I need to know exactly what that web service is doing and expecting from the file. As I said, the first big issue is potentially with the tHttpRequest component. If that is working as expected, then we can move over to the other issues. It would be too much to write a solution to everything without knowing the details of each section.