문제

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.

도움이 되었습니까?

해결책

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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top