<?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:int-script="http://www.springframework.org/schema/integration/scripting"
	xsi:schemaLocation="http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration/scripting https://www.springframework.org/schema/integration/scripting/spring-integration-scripting.xsd">

	<channel id="shortStrings">
		<queue/>
	</channel>

	<channel id="longStrings">
		<queue/>
	</channel>

	<router input-channel="referencedScriptInput">
		<int-script:script lang="groovy" location="org/springframework/integration/scripting/config/jsr223/Jsr223RouterTests.groovy">
			<variable name="maxLen" value="3"/>
		</int-script:script>
	</router>

	<router input-channel="inlineScriptInput">
		<int-script:script lang="groovy">
				payload.length() > 5 ? 'longStrings' : 'shortStrings'
		</int-script:script>
	</router>

	<chain input-channel="scriptRouterWithinChainInput">
		<router>
			<int-script:script lang="groovy">
				payload.length() > 5 ? 'longStrings' : 'shortStrings'
			</int-script:script>
		</router>
	</chain>


</beans:beans>
