I know that is your requirement but wouldn't it make sense to move the
files that failed the filter to some other folder so it will be easier to
notice them rather than keep them in the source folder? Makes everything
more complicated.

On Thu, Mar 23, 2017 at 8:51 PM, Hari [via Camel] <
[email protected]> wrote:

> Hi,
>
> I am new to camel. I have a requirement to move XML files from one
> directory to another based on some conditions in the content of the XML
> file.
>
> Here is how the route i wrote looks like. The StatusFilter, returns true
> or false , based on the condition. When the condition is not met, I need
> the file to remain in the source folder. The below route does not move the
> file when the filter returns false, which is exactly what i want, but it is
> moving the file to .camel folder.
>
> Need help to retain the file in the source folder, when the condition is
> not met. Tried noop and delete options, but it did not work.
>
> from("file:d:\\data\\inprocess?recursive=true").
> convertBodyTo(String.class).filter().method(new StatusFilter(),
> "filter").
> process(new Processor() {
>                     public void process(Exchange exchange) throws
> Exception {
>                         ....
>                         ..
>                         }
>                         }).
>                 to("file:d:\\data\\register\\completed");
>
>
> Please help.
> Regards,
> Hari
>
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Need-help-retaining-files-
> in-source-folder-tp5796053.html
> To start a new topic under Camel - Users, email
> [email protected]
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Need-help-retaining-files-in-source-folder-tp5796053p5796054.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to