There is a setter method that accepts an org.apache.camel.Expression. So you can use that to use a GroovyExpression.
Though if you want to do that from XML then that is not so easy. But from Java code its easier as its just to call set setter method, on the FileEndpoint instance. On Fri, Apr 19, 2013 at 6:31 PM, javamonkey79 <[email protected]> wrote: > This is from the documentation of the file2 component: > > Use Expression such as File Language to dynamically set the filename. For > consumers, it's used as a filename filter. For producers, it's used to > evaluate the filename to write. If an expression is set, it take precedence > over the CamelFileName header. (Note: The header itself can also be an > Expression). The expression options support both String and Expression > types. *If the expression is a String type, it is always evaluated using the > File Language. If the expression is an Expression type, the specified > Expression type is used* - this allows you, for instance, to use OGNL > expressions. > > I'd like to be able to use a groovy expression, but for the life of me can't > figure out how to do it. Can anyone provide an example, or have I > misunderstood the documentation? > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/use-of-expression-in-file-name-tp5731154.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: [email protected] Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
