You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Bovas <bo...@gmail.com> on 2013/07/25 17:26:46 UTC

Re: Assigning File names to exchanges generated from split

Sorry for opening this old post.

you can call your function with your simple.body?
/simple("${body.getAttribute(levelIdentifier)}/

/You can call a bean in the setHeader so the result of the bean is the
header value. /


That I do :

.setHeader(Exchange.FILE_NAME).simple("bean://Mymethod?method=getAttribute('test')")
.to('file://path)

public String getAttribute(String key){
		String res = key
		int nb = 0;
		nb++
		return res +"${nb};
	}

it doesn't work :/



-----
regards,
Bovas
--
View this message in context: http://camel.465427.n5.nabble.com/Assigning-File-names-to-exchanges-generated-from-split-tp5715603p5736270.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Assigning File names to exchanges generated from split

Posted by Bovas <bo...@gmail.com>.
I resolve my problem. 
 
.setHeader(Exchange.FILE_NAME).simple("${bean:mybean?method=getRes('test')}.txt")



-----
regards,
Bovas
--
View this message in context: http://camel.465427.n5.nabble.com/Assigning-File-names-to-exchanges-generated-from-split-tp5715603p5736281.html
Sent from the Camel - Users mailing list archive at Nabble.com.