On 17 May 2013, at 09:33, Claus Ibsen <claus.ib...@gmail.com> wrote:
> You can use the move option on the Camel file consumer, and then use a
> bean to calculate the file name. http://camel.apache.org/file2

Claus, by the way, your comment let to an 'aha' moment - the kind that Manning 
talk about :)

Being new to Camel, I hadn't realised the implications of the documentation for 
File Component’s 'move' property (the implication being that I can write my own 
code to calculate the file name):

> move: Expression (such as File Language) used to dynamically set the filename 
> when moving it after processing.

Note that a later sentence on the same page seems to contract that I can use 
this to calculate the file name:

> The move and preMove options should be a directory name, which can be either 
> relative or absolute.


Anyway, your suggestion to use a bean prompted me to drill down (→ 
http://camel.apache.org/expressionhttp://camel.apache.org/bean-language) and 
realise that I can always implement an expression or predicate as a method in 
my own bean class.

For what it’s worth, I don’t yet see how I would discover that my bean must 
have a 'calculateFileName' method - whether Camel will pick this method because 
it's the only one, or whether it has to have that name, for example. I’ll save 
that for another day.

Thanks again,
Peter

Reply via email to