Created
December 12, 2017 02:03
-
-
Save rashedtalukder/d96ad7288af2913923c6aa84c667269b to your computer and use it in GitHub Desktop.
Conditional Flows with Choice Router Challenge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" | |
xmlns:spring="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd | |
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd | |
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd | |
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> | |
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> | |
<flow name="choice_flow"> | |
<http:listener config-ref="HTTP_Listener_Configuration" path="/choose" doc:name="HTTP"/> | |
<set-variable variableName="value" value="#[message.inboundProperties.'http.query.params'.value]" doc:name="choice path"/> | |
<choice doc:name="Choice"> | |
<when expression="#[flowVars.value == '1']"> | |
<logger message="Entered first route" level="INFO" doc:name="Logger"/> | |
</when> | |
<when expression="#[flowVars.value == 'one']"> | |
<logger message="Entered second route" level="INFO" doc:name="Logger"/> | |
</when> | |
<otherwise> | |
<logger message="Entered third route" level="INFO" doc:name="Logger"/> | |
</otherwise> | |
</choice> | |
</flow> | |
</mule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment