Hi Andy, try this:
from("direct:map") .choice() .when(simple("${body.size} == 0")) .to("mock:null") .otherwise() .to("mock:notnull"); Best regards - Claus On 07.12.2010 13:04, Andy Bourke wrote:
Hi, I have been trying to influence whether or not the next endpoint gets processed based on some aspect of the mesage body using spring DSL and am having no luck with it. I have tried various incarnations of the following configuration (including<CHOICE><WHEN> tags in place of <FILTER>) ${out.body}.size> 0 In my mind, this should only Marshal the data and create the output file if the size of the Map in the Message body is greater than zero. The bean (formatOutput) always adds a Map object to the body but this may contain no elements. Can you tell me what I am doing wrong please? Thanks.
-- claus straube __________________________________________ phone +49-89-38157419 mobile +49-176-49673717 web http://www.catify.com office 6. floor, heßstr. 56, 80798 munich __________________________________________ catify | claus straube, sebastian münz