You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sr0bb0 <si...@fuselogic.co.uk> on 2014/09/09 11:39:41 UTC
Missing source file
Hi, I am new to Camel. What's the best approach to read one file (FileA in
example below), and only enrich it with FileB if fileB exists, otherwise
just use contents of fileA. Using XML...
<camelContext xmlns="http://camel.apache.org/schema/spring"
autoStartup="true">
<route id="readFileA" trace="true">
<from uri="file:C:\temp?fileName=FileA.csv"/>
<bean ref="FileToStringList" method="read"/>
<bean ref="FileAToMap" method="getMappedData"/>
<to uri="seda:fileA"/>
</route>
<route id="readFileB" trace="true">
<from uri="file:C:\temp?fileName=FileB.csv"/>
<bean ref="FileToStringList" method="read"/>
<bean ref="FileBToMap" method="getMappedData"/>
<to uri="seda:fileB"/>
</route>
<route id="transformSDLJob" trace="true">
<from uri="seda:fileA"/>
<pollEnrich uri="seda:fileB" strategyRef="AggregateMaps"
timeout="10000" />
<bean ref="MergeMapsAandB" method="merge"/>
<to uri="seda:C"/>
</route>
<route id="outSDL" trace="true">
<from uri="seda:C"/>
<bean ref="OutputFields" method="select"/>
<to
uri="file:C:\temp?fileName=fileC.csv&fileExist=Override"/>
</route>
</camelContext>
--
View this message in context: http://camel.465427.n5.nabble.com/Missing-source-file-tp5756234.html
Sent from the Camel - Users mailing list archive at Nabble.com.