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:substring-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.ContentType">application/xml</parameter>
    <parameter
name="transport.vfs.FileURI">file:///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.MoveAfterProcess">file:///C:/Flatfile/orgFilesProcessedSuccessfully</parameter>
</proxy>

With Regards,
Aditya
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to