title: WSO2 ESB 4.8 VFS proxy service - MoveAfterFailure?
body: <p>I have some doubts about how VFS proxy services work on WSO2 ESB 4.8.0.</p>
  
  <p>I prepared the following test service:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;proxy xmlns="http://ws.apache.org/ns/synapse"
         name="testvfs"
         transports="vfs"
         statistics="enable"
         trace="enable"
         startOnLoad="true"&gt;
     &lt;target&gt;
        &lt;inSequence&gt;
           &lt;log level="full"&gt;
              &lt;property name="test" value="before error"/&gt;
           &lt;/log&gt;
           &lt;dbreport&gt;
              &lt;connection&gt;
                 &lt;pool&gt;
                    &lt;password&gt;admin&lt;/password&gt;
                    &lt;user&gt;admin&lt;/user&gt;
                    &lt;url&gt;adfs&lt;/url&gt;
                    &lt;driver&gt;dfsa&lt;/driver&gt;
                 &lt;/pool&gt;
              &lt;/connection&gt;
              &lt;statement&gt;
                 &lt;sql&gt;select 1;&lt;/sql&gt;
              &lt;/statement&gt;
           &lt;/dbreport&gt;
           &lt;log level="full"&gt;
              &lt;property name="test" value="after error"/&gt;
           &lt;/log&gt;
        &lt;/inSequence&gt;
     &lt;/target&gt;
     &lt;parameter name="transport.PollInterval"&gt;1&lt;/parameter&gt;
     &lt;parameter name="transport.vfs.ActionAfterProcess"&gt;MOVE&lt;/parameter&gt;
     &lt;parameter name="transport.vfs.ActionAfterFailure"&gt;MOVE&lt;/parameter&gt;
     &lt;parameter name="transport.vfs.FileURI"&gt;file://C:\testvfs\in&lt;/parameter&gt;
     &lt;parameter name="transport.vfs.MoveAfterProcess"&gt;file://C:\testvfs\out&lt;/parameter&gt;
     &lt;parameter name="transport.vfs.MoveAfterFailure"&gt;file://C:\testvfs\original&lt;/parameter&gt;
     &lt;parameter name="transport.vfs.FileNamePattern"&gt;.*.csv&lt;/parameter&gt;       
     &lt;parameter name="transport.vfs.ContentType"&gt;text/plain&lt;/parameter&gt;
  
     &lt;description/&gt;
  &lt;/proxy&gt;
  </code></pre>
  
  <p>It should:</p>
  
  <ul>
  <li>wait for a file to appear in C:\testvfs\in</li>
  <li>process the file (in my example, do log-dbreport-log sequence)</li>
  <li>if the processing was successful, move the file to C:\testvfs\out</li>
  <li>if there was a failure, the file should go to C:\testvfs\original</li>
  </ul>
  
  <p>At least that's how I understand the VFS transport and it's parameters.</p>
  
  <p>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.</p>
  
  <p>Instead, the file goes to \out directory.</p>
  
  <p>Am I missing something or is it a bug in 4.8.0?</p>