Skip to content

Instantly share code, notes, and snippets.

@dfeist
Created September 1, 2010 22:40
Show Gist options
  • Save dfeist/561499 to your computer and use it in GitHub Desktop.
Save dfeist/561499 to your computer and use it in GitHub Desktop.
<flow>
<file:inbound-endpoint path="/myDirectory">
<file:filename-wildcard-filter pattern="*.xml"/>
</file:inbound-endpoint>
<xml:xslt-transformer file="transform-to-my-format.xslt"/>
<splitter expresion="xpath://order"/>
<!-- The following message processors will be invoked for each order in the xml file -->
<choice>
<when evaluator="xpath" expression="xpath:/order[@type='book']">
<component class="org.my.company.BookOrderService"/>
</when>
<when evaluator="xpath" expression="xpath:/order[@type='cd']">
<flow-ref name="cdOrders" />
</when>
<otherwise>
<jms:outbound-endpoint queue="failedOrders"/>
</otherwise>
</choice>
<async>
<flow-ref name="updateInventory"/>
</async>
<smtp:outbound-enpoint subject="Order Confirmation" to="#[xpath:/order/user/email]" from="[email protected]">
<custom-transformer class="org.my.company.ConfirmationEmailTransformer"/>
</smtp:outbound-endpoint>
<default-exception-strategy>
<jms:outbound-endpoint queue="failedOrders"/>
</default-exception-strategy>
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment