<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
			 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			 xmlns:beans="http://www.springframework.org/schema/beans"
			 xmlns:task="http://www.springframework.org/schema/task"
			 xmlns:context="http://www.springframework.org/schema/context"
			 xmlns:util="http://www.springframework.org/schema/util"
			 xsi:schemaLocation="http://www.springframework.org/schema/beans
			https://www.springframework.org/schema/beans/spring-beans.xsd
			http://www.springframework.org/schema/integration
			https://www.springframework.org/schema/integration/spring-integration.xsd
			http://www.springframework.org/schema/task
			https://www.springframework.org/schema/task/spring-task.xsd
			http://www.springframework.org/schema/context
			https://www.springframework.org/schema/context/spring-context.xsd
			http://www.springframework.org/schema/util
			https://www.springframework.org/schema/util/spring-util.xsd">

	<util:properties id="properties">
		<beans:prop key="myRoutePath1">channel1</beans:prop>
		<beans:prop key="myRoutePath2">request.headers[myRoutingSlipChannel]</beans:prop>
	</util:properties>

	<context:property-placeholder properties-ref="properties"/>

	<message-history/>

	<task:executor id="executor"/>

	<beans:bean id="routingSlipRoutingPojo"
				class="org.springframework.integration.routingslip.RoutingSlipTests$TestRoutingSlipRoutePojo"/>

	<beans:bean id="routingSlipRoutingStrategy"
				class="org.springframework.integration.routingslip.RoutingSlipTests$TestRoutingSlipRouteStrategy"/>

	<header-enricher input-channel="input" output-channel="split">
		<routing-slip
				value="${myRoutePath1}; @routingSlipRoutingPojo.get(request, reply);
							routingSlipRoutingStrategy; ${myRoutePath2}; aggregate"/>
	</header-enricher>

	<splitter input-channel="split" output-channel="process"/>

	<channel id="process">
		<dispatcher task-executor="executor"/>
	</channel>

	<bridge input-channel="process"/>

	<bridge input-channel="channel1"/>

	<bridge input-channel="channel2"/>

	<bridge input-channel="channel3"/>

	<bridge input-channel="channel4"/>

	<chain input-channel="channel5">
		<header-filter header-names="myRoutingSlipChannel"/>
	</chain>

	<aggregator input-channel="aggregate" expression="new java.util.ArrayList(#root)"/>

	<beans:bean class="org.springframework.integration.routingslip.RoutingSlipTests$RoutingSlipConfiguration"/>

</beans:beans>
