Thursday, February 27, 2014

MoveAfterFailure in VFS mediator of WSO2 ESB

There is a miss understanding on the word "MoveAfterFailure" in VFS mediator of wso2 ESB. Most  of the users use it first time does not understand the right meaning of that parameter.  So i thought to give a brief idea about what is the true fact behind it.


So let see the workflow:

wait for a file to appear in C:\sampleVFS\in
process the file (in my example, do log-dbreport-log sequence)
if the processing was successful, move the file to C:\sampleVFS\out
if there was a failure, the file should go to C:\sampleVFS\original
At least that's how I understand the VFS transport and it's parameters.

Everything went perfect, So now I intentionally corrupted dbreport mediator (incorrect url and driver class). I expected every input to be transferred to \original directory as the processing always fail. But Instead, the file goes to \out directory.

Yes that is right behavior

WSO2 Enterprise Serivce Bus (ESB) has been implemented in way to handle the errors [1] while reading the message OR Processing the message via MoveAfterFailure.If you want to handles the endpoint failure OR DB failure you have to use the error handling techniques used in WSO2 ESB.