Search code examples
wso2vfswso2-esb

WSO2 - VFS not moving file to the right path on failure


I'm facing a little issue on WSO2 VFS system. I have a simple inbound-endpoint that scan a folder every 5 seconds to read a CVS file. I want to handle the case where the filename is not the expected one. I managed that with an error sequence but still I got a technical error:

ERROR - FilePollingConsumer Error moving file : file:///C:/Servers/Flux/Input/UESMGEN_2AAB_20160729.csv to file:///C:/Servers/Flux/Output/Process/ org.apache.commons.vfs2.FileSystemException: Could not rename "

I used the transport.vfs.MoveAfterFailure but the file is moved to the transport.vfs.MoveAfterProcess path. I assume this is due to the technical error.

But when I test my sequence with a correct file, everything goes well.

Any thoughts on this ? Thanks for your help


Solution

  • transport.vfs.MoveAfterFailure is used before the mediation, when an error occurs in the transport layer / in flow of axis2 (for exemple, when building an application/xml message where some end tags are missing).

    As soon as the message comes in your mediation, even if a fault sequence is executed, transport.vfs.MoveAfterProcess will be used

    (this is the way it works with ESB 4.8.1, cannot say this is still the same with ESB 5)