I'm trying to pass back the # of things I've processed in a route back to the
calling Java.
This log() displays the correct number:
.log(LoggingLevel.INFO, "Processing ${body.size} Things ...")
I then tried putting that ${body.size} in a GlobalOption on the CamelContext so
I can access it later:
.process(exchange -> exchange.getContext().getGlobalOptions().put("NumThings",
simple("${body.size}").toString()) )
However, the above, and a few variations of the simple(), causes this:
System.out.println(String.format("*** Processed %s Things",
camContext.getGlobalOption("NumThings")));
to gives this:
*** Processed Simple: ${body.size} Things
I just can't figure out how to do the evaluations and get that value in the
GlobalOptions. (I googled and googled...)
Or maybe there's a better way to store it in the CamelContext?
Thanks.