Question

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.

Was it helpful?

Solution

For this:

  • Configure a second file connector that has the moveToDirectory attribute 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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top