gruby karol
gruby karol

Reputation: 329

WSO2 ESB 4.8 VFS proxy service - MoveAfterFailure?

I have some doubts about how VFS proxy services work on WSO2 ESB 4.8.0.

I prepared the following test service:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="testvfs"
       transports="vfs"
       statistics="enable"
       trace="enable"
       startOnLoad="true">
   <target>
      <inSequence>
         <log level="full">
            <property name="test" value="before error"/>
         </log>
         <dbreport>
            <connection>
               <pool>
                  <password>admin</password>
                  <user>admin</user>
                  <url>adfs</url>
                  <driver>dfsa</driver>
               </pool>
            </connection>
            <statement>
               <sql>select 1;</sql>
            </statement>
         </dbreport>
         <log level="full">
            <property name="test" value="after error"/>
         </log>
      </inSequence>
   </target>
   <parameter name="transport.PollInterval">1</parameter>
   <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
   <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
   <parameter name="transport.vfs.FileURI">file://C:\testvfs\in</parameter>
   <parameter name="transport.vfs.MoveAfterProcess">file://C:\testvfs\out</parameter>
   <parameter name="transport.vfs.MoveAfterFailure">file://C:\testvfs\original</parameter>
   <parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>       
   <parameter name="transport.vfs.ContentType">text/plain</parameter>

   <description/>
</proxy>

It should:

At least that's how I understand the VFS transport and it's parameters.

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.

Instead, the file goes to \out directory.

Am I missing something or is it a bug in 4.8.0?

Upvotes: 4

Views: 708

Answers (1)

Vanji
Vanji

Reputation: 1704

This is not a bug. WSO2 Enterprise Serivce Bus (ESB) has been implemented in way to handle the errors 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.

[1] http://docs.wso2.org/display/ESB480/Error+Handling

[2] http://wso2.com/library/articles/wso2-enterprise-service-bus-endpoint-error-handling/

Upvotes: 4

Related Questions