Hi, IMHO, there is no way to achieve this and all the available files in source location will be picked and processed. You can do the following as a workaround.
when you process the file, 1. copy the file into another backup directory using file connector <https://store.wso2.com/store/assets/esbconnector/details/5d6de1a4-1fa7-434e-863f-95c8533d3df2> . 2. check whether the particular file is available in the backup directory. If it is not there, you can process it. [1] https://docs.wso2.com/display/ESBCONNECTORS/Working+ with+the+File+Connector#WorkingwiththeFileConnector-copy [2] https://docs.wso2.com/display/ESBCONNECTORS/Working+with+ the+File+Connector#WorkingwiththeFileConnector-isFileExist Thanks On Tue, Jul 10, 2018 at 11:31 AM, aditya shivankar < [email protected]> wrote: > Respected Sir, > > I have to process only the files which are coming to the folder *newly* ( > there could be files which are already existing in the folder which should > not be picked for processing ) > > The client does not want to move the files to another folder after > processing. So if the file remains in the same folder after processing. > They should not be re-processed and should remain in the same folder with > same extension > > Below is the code I am trying. But I am not able to achieve above .P*lease > guide*. > > <?xml version="1.0" encoding="UTF-8"?> > <proxy name="FlatFileProxy" startOnLoad="true" transports="vfs" xmlns=" > http://ws.apache.org/ns/synapse"> > <target> > <inSequence> > <property name="FORCE_SC_ACCEPTED" scope="axis2" type="STRING" > value="true"/> > <property name="REST_URL_POSTFIX" scope="axis2" type="STRING" > value=""/> > <property action="remove" name="ClientApiNonBlocking" > scope="axis2"/> > <datamapper config="gov:datamapper/xmlToCsv1.dmc" > inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json" inputType="XML" > outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json" > outputType="CSV"/> > <property expression="fn:concat(fn:subst > ring-after(get-property('MessageID'), 'urn:uuid:'), '.csv')" > name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/> > <property name="OUT_ONLY" scope="default" type="STRING" > value="true"/> > <property name="messageType" scope="axis2" type="STRING" > value="application/csv"/> > <property action="remove" name="LAST_MODIFIED" > scope="transport"/> > <send> > <endpoint> > <address uri="vfs:file:///C:/Flatfile/output"/> > </endpoint> > </send> > </inSequence> > <outSequence/> > <faultSequence/> > </target> > <parameter name="transport.vfs.Streaming">true</parameter> > <parameter name="transport.PollInterval">50ms</parameter> > <parameter name="transport.vfs.ContentTyp > e">application/xml</parameter> > <parameter name="transport.vfs.FileURI">f > ile:///C:/Flatfile/input1</parameter> > <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter> > <parameter name="transport.vfs.MoveAfterFailure">file:///C:/Flatfile/ > failure</parameter> > <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter> > <parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter> > <parameter name="transport.vfs.Locking">disable</parameter> > <parameter name="transport.vfs.MoveAfterP > rocess">file:///C:/Flatfile/orgFilesProcessedSuccessfully</parameter> > </proxy> > > With Regards, > Aditya > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Shakila Sasikaran Software Engineer Mobile :+94 (0) 77 526 6848 [email protected] WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
