Skip to content

Instantly share code, notes, and snippets.

@dfeist
Created January 5, 2012 15:04
Show Gist options
  • Save dfeist/1565620 to your computer and use it in GitHub Desktop.
Save dfeist/1565620 to your computer and use it in GitHub Desktop.
<flow name="orderProcessingFlow">
<file:inbound-endpoint path="/tmp/demo"/>
 <enricher target="#[variable:OrderType]" source="regex:TYPE=(\w+)\n(?:\n|.)+?">
  <echo-component/>
 </enricher>
 <choice>
  <when expression="#[variable:OrderType = Book]">
    <logger level="INFO" message="BOOK: #[payload]"/>
   </when>
   <when expression="#[variable:OrderType = CD]">
    <logger level="INFO" message="CD: #[payload]"/>
   </when>
   <otherwise>
    <logger level="ERROR" message="Unknown Order Type: #[variable:OrderType]"/>
   </otherwise>
 </choice>
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment