My route is built in parts from different spots in my code, and at one
point I do a split:
choice().when(...).bean(...).split().method(splitBean,
"splitMethod").endChoice().otherwise().bean(...);
This results in a "IllegalArgumentException: Definition has no children
on Split...".
But at this point in the code I don't know what's going to be added to
the route, I just want the results of the split() to be forwarded down
the route. I currently accomplish this by sticking a no-op processor
into the route:
...split().method(...).process(new Processor() { public void
process(Exchange e) { /* no-op */ }}).endChoice()...
Which works fine, but do I really have to do this (it seems kind of ugly
and inefficient)? Is there something better as a Camel coding idiom
that's maybe more efficient?
- Java DSL: do I have to have a child for a split()? Keith Freeman
-