Dynamic
Evaluate in Mule 4
It
transforms input message into another data format.
Flow:
Dynamic
evaluate configuration:
Method: GET
Output:
XML project
code:
<?xml version="1.0"
encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<http:listener-config name="HTTP_Listener_config"
doc:name="HTTP Listener config" doc:id="7f86a4b6-05a1-4a97-9662-f8a6425f4397"
>
<http:listener-connection host="0.0.0.0"
port="8085" />
</http:listener-config>
<flow name="test_dynamicevaluateFlow"
doc:id="329dd92d-bf49-4203-872b-321990398eac"
>
<http:listener doc:name="Listener"
doc:id="360e03b6-e909-4b6c-9066-0fb0e3eb7160"
config-ref="HTTP_Listener_config" path="/dynamic"/>
<set-variable value="11"
doc:name="Set Variable" doc:id="14a2f207-d5d1-407c-a43d-2133358e2cc4"
variableName="var1"/>
<ee:dynamic-evaluate doc:name="Dynamic Evaluate"
doc:id="5702d659-2654-40b4-ae59-b0fcf4edc599"
expression="#[vars.var1]"/>
<logger level="INFO"
doc:name="Logger" doc:id="74bd7821-cab9-4f46-9592-35cb44d92b88"
message="#[payload]"/>
</flow>
</mule>
No comments:
Post a Comment
If you have any doubt, please let me know