Mule 3.5.0 - How to move a file to a temporary folder whilst processing, and a different folder when finished?

StackOverflow https://stackoverflow.com/questions/21991462

Domanda

I currently have a Mule application that listens for a file in an Input folder, and when detected, reads that file into a database and moves it to an Archive folder. I'd like to know if it's possible to move it to a temporary folder whilst it is being processed and then moved to Archive if read successfully, or to an Error folder if any issues are encountered. The ideal 'journey' of the file would be:

  1. Input Folder
  2. Temp Processing Folder
  3. Archive Folder (success) OR Error Folder (issue found)

I'm currently only able to read the file from Input and move it to Archive using the moveToDirectory attribute in my endpoint. Any advice would be appreciated, thanks in advance.

È stato utile?

Soluzione

Configure a the work directory on the connector.

From the documentation:

workDirectory The directory path where the file should be moved to prior to processing. The work directory must reside on the same file system as the read directory.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top