Announcement Announcement Module
Collapse
No announcement yet.
else condition for xpath-router Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • else condition for xpath-router

    Hi Guys,

    Just a quick question about xpath-router. in xpath-router configuration it provides kind of conditional statements based on expression.

    Code:
    <int-xml:xpath-router id="responderRouter" input-channel="orderChannel">
        <int-xml:xpath-expression expression="/request/responders"/>
        <int-xml:mapping value="responderA" channel="channelA"/>
        <int-xml:mapping value="responderB" channel="channelB"/>
    </int-xml:xpath-router>
    Does this provides ElSE functionality. i had a look at spring integration xsd as well but couldn't find any thing related to this. Is there any way of achieving this else functionality?

    appreciate your help

    Thanks,
    Kelumt

  • #2
    Add a default-output-channel

    From the SI Schema (abstractRouterType):

    Reference to the channel where Messages should be sent if
    channel resolution fails to return any channels. If no
    default output channel is provided, the router will throw an
    Exception.

    If you would like to silently drop those messages instead,
    add the "nullChannel" as the default output channel attribute
    value.

    Comment

    Working...
    X