'Mule 3.5.0 - Can you move a file to a directory when using the Mule Requestor module?
I'm using a Mule Requester module in my flow to retrieve a csv file from an input folder and insert it's contents into a JDBC database. Is there a way I can move this file to another directory once it has been processed (in the same way a file endpoint can)? Currently the file is deleted and I'm thrown errors when I try to use the autoDelete and moveToDirectory attributes in my mulerequester tag. Including the mulerequestor tag for reference:
<mulerequester:request config-ref="Mule_Requester" resource="file://..." doc:name="File Requester"/>
Also - using a file endpoint rather than the requester isn't an option in this case. Thanks in advance.
Solution 1:[1]
For this:
- Configure a second file connector that has the
moveToDirectoryattribute set to wherever your files need to be moved. Use it explicitly in the requester:
<mulerequester:request config-ref="Mule_Requester" resource="file://...?connector=movingConnector" doc:name="File Requester"/>- Configure any other file inbound endpoints to explicitly use the other pre-existing connector.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | David Dossot |
