java - How to avoid null body from entering into next processor in multiple steps -
how can restrict null body entering multiple processor @ 1 common place. in below code instead of putting null body check @ every processor, how can define @ single place ?
<choice> <when> <simple>${body} != null</simple> <process ref="processor1" /> <choice> <when> <simple>${body} != null</simple> <process ref="processor2" /> <!-- splitter --> <split> <simple>body</simple> <process ref="processor3" /> </split> </when> </choice> </when> </choice>
i suggest leave root all-together, rendering further null checks obsolete. quick , easy way stop route-processing current message setting exchange.route_stop
property on exchange
object , return null
:
exchange.getproperty(exchange.route_stop, boolean.true)
Comments
Post a Comment