-1

I am trying this tutorial from this given link https://ei.docs.wso2.com/en/latest/micro-integrator/use-cases/tutorials/file-processing/

Here is the file proxy definition

<?xml version="1.0" encoding="UTF-8"?>
<proxy name="daily-file-proxy" startOnLoad="true" transports="vfs" xmlns="http://ws.apache.org/ns/synapse">
    <target>
        <inSequence>
            <log level="full"/>
            <clone>
                <target sequence="daily-file-file-write-sequence"/>
                <target sequence="daily-file-mail-notification-sequence"/>
                <target sequence="daily-file-db-sequence"/>
            </clone>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </target>
    <parameter name="transport.PollInterval">15</parameter>
    <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
    <parameter name="transport.vfs.MoveAfterProcess">$FILE:FILE_DAILY_PROCESS</parameter>
    <parameter name="transport.vfs.FileURI">$FILE:FILE_DAILY_DOWNLOAD</parameter>
    <parameter name="transport.vfs.MoveAfterFailure">$FILE:FILE_DAILY_FAILURE</parameter>
    <parameter name="transport.vfs.FileNamePattern">.*.txt</parameter>
    <parameter name="transport.vfs.ContentType">text/plain</parameter>
    <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
</proxy>

I also declared all the parameters in the file.properties as well.

This code worked properly from Integration Studio as I drop the txt file in the FILE:FILE_DAILY_PROCESS, it processed in 15 sec and put the data into database.

Then I packaged the project as car file and deployed to micro integerator wso2 in the centos server.

I checked the log and everything deployed properly without error (wso2carbon.log and wso2-error.log not show any error)

I am thinking that the wso2ei could not see the folder declaring

Here is the parameters declaring in file.properties

FILE_DAILY_DOWNLOAD=file:///root/file-processing/daily-download/202107
FILE_DAILY_PROCESS=file:///root/file-processing/daily-process
FILE_DAILY_PROCESS_URI=vfs:file:///root/file-processing/daily-process
FILE_DAILY_FAILURE=file:///root/file-processing/daily-failure
Lam Do
  • 520
  • 4
  • 12
  • 1
    You don't provide any info whatsoever that could allow people to help you. Please read [ask]! Also, ask yourself if you want to report a bug instead or if you're asking a programming question at all, an not one about the use of existing software. – Ulrich Eckhardt Jul 25 '21 at 10:23
  • @UlrichEckhardt, I edited the question as your suggestion. Thanks – Lam Do Jul 25 '21 at 10:40

1 Answers1

0

finally, I have figured out the issue. The wso2 could not see the specific folder under ssh user root. It must be under /home/wso2 so the VFS listener only see the folder available under /home/wso2 folder

So use the update settings

FILE_DAILY_DOWNLOAD=file:///home/wso2/file-processing/daily-download/202107
FILE_DAILY_PROCESS=file:///home/wos2/file-processing/daily-process
FILE_DAILY_PROCESS_URI=vfs:file:///home/wso2/file-processing/daily-process
FILE_DAILY_FAILURE=file:///home/wso2/file-processing/daily-failure
Lam Do
  • 520
  • 4
  • 12