How do you specify an output channel for xpath-router when the xpath expression is met. And when the condition is not met, how can I specify one or more channels to be the recipients
How do you specify an output channel for xpath-router when the xpath expression is met. And when the condition is not met, how can I specify one or more channels to be the recipients
If I understand your question correctly then all you need is channel-resolver. If you look at the XML examples (BookOrderProcessingSample). In this example MapBasedChannelResolver is used which does exactly what you are asking, by routing to different channels based on true/false evaluation of XPath expression
Code:. . . . <map> <entry key="true" value-ref="warehouseDispatchChannel" /> <entry key="false" value-ref="outOfStockChannel" /> </map> . . . .
Oleg Zhurakousky
Spring Integration team
http://twitter.com/z_oleg
http://blog.springsource.com/author/ozhurakousky/