You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by nguyen <qu...@gmail.com> on 2013/10/07 09:20:57 UTC

Setting the flag non identifying job parameter in Camel route header with camel-spring-batch

Hi all,

I'm using camel-spring batch 2.10.3 and integrate with spring batch core
2.2.0. 
In spring batch 2.2.0, it supports the option of non-identifying job
parameters, and I need to modify some of the job parameters to be
non-identifying.

Currently, all the headers found in the Camel message are passed to the
JobLauncher as job parameters, and by default, they are "identifying" job
parameter.

I read the Camel documentation for the spring batch, but can not figure out
if there's an option for me to set the flag identifying(false) job parameter
to the Job Launcher.

Or do i need to remove these headers from my camel route and implement some
other solution in the batch job.

Any help, suggestion is really appreciated.

Best Regards,

Below is my route definition : 
For example, if fileExpectedLineCount or fileActualLineCount are set to be
non identifying job parameters.

<camelContext id="transactionBatchRoutes"
xmlns="http://camel.apache.org/schema/spring">
  <route id="transactionFileRoute">
	<from
uri="file:{{batch.process.watch.directory}}?include={{transaction.file.name.pattern}}&amp;delay={{transaction.file.poll.delay}}&amp;doneFileName=${file:name}.sig&amp;move={{batch.process.done.directory}}&amp;moveFailed={{batch.process.failed.directory}}"
/>
	<setHeader headerName="fileName">
		<simple>${headers.CamelFileNameOnly}</simple>
	</setHeader>
	<setHeader headerName="lineMetaData">
		<method bean="transactionFileMetaDataExtractor"
method="getFileLineCountAndLastLine" />
	</setHeader>
	<setHeader headerName="fileExpectedLineCount">
		<simple>${headers.lineMetaData.expectedLineCount}</simple>
	</setHeader>
	<setHeader headerName="fileActualLineCount">
		<simple>${headers.lineMetaData.actualLineCount}</simple>
	</setHeader>



--
View this message in context: http://camel.465427.n5.nabble.com/Setting-the-flag-non-identifying-job-parameter-in-Camel-route-header-with-camel-spring-batch-tp5741018.html
Sent from the Camel - Users mailing list archive at Nabble.com.