Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<flow name="greedy">
<http:inbound-endpoint host="localhost" port="${httpPort}" path="change-machine"
exchange-pattern="request-response"/>
<http:body-to-parameter-map-transformer />
<set-payload value="#[payload['amount']]" />
<transformer ref="StringToNumber" />
<transformer ref="DollarsToCents"/>
<choice>
<when expression="payload.currency == 'USD'">
<scripting:component doc:name="USD Currency Script">
<scripting:script file="greedy.groovy">
<property key="currency" value="USD"/>
</scripting:script>
</scripting:component>
</processor-chain>
</when>
<when expression="payload.currency == 'GBP'">
<processor-chain>
<scripting:component doc:name="GBP Currency Script">
<scripting:script file="greedy.py">
<property key="currency" value="GBP"/>
</scripting:script>
</scripting:component>
</processor-chain>
</when>
</choice>
</flow>
@nearnshaw

This comment has been minimized.

Copy link

commented Nov 12, 2014

since this article will be published in 3.6, shouldn't the http:inbound-endpoint be changed for the new http connector?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.