camel-spring-batch would have to fail with an exception for the file consumer to move the file to the failed directory.
Not sure how spring batch triggers this. I suggest to dive into the source code / unit tests to take a look. On Tue, Oct 1, 2013 at 12:31 AM, nguyen <[email protected]> wrote: > Oups the route didn't show.. Inserted now the route definition. > > <camelContext id="transactionBatchRoutes" > xmlns="http://camel.apache.org/schema/spring"> > <route id="transactionFileRoute"> > <description> > Route to poll a directory for transaction alert file and > launch the job > </description> > <from > > uri="file:{{batch.process.watch.directory}}?include={{transaction.file.name.pattern}}&delay={{transaction.file.poll.delay}}&doneFileName=${file:name}.sig&move={{batch.process.done.directory}}&moveFailed={{batch.process.failed.directory}}" > /> > <setHeader headerName="fileName"> > <simple>${headers.CamelFileNameOnly}</simple> > </setHeader> > > <to uri="spring-batch:transactionFileJob?jobLauncherRef=jobLauncher" /> > </route> > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-route-how-to-move-the-file-in-the-failed-directory-if-there-s-an-error-tp5740611p5740613.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
