Processor Level Error Handling Introduction with Hands-On using Anypoint Studio (Mule 4) — Part 1

Error Handling Scenario 1

<?xml version="1.0" encoding="UTF-8"?><mule xmlns:validation=""
xmlns:http="" xmlns=""
xmlns:xsi="" xsi:schemaLocation="">
<flow name="scenario-7Flow" doc:id="599ae7d9-76ae-422b-a0a4-d3ba949074cb" >
<http:listener doc:name="Listener" doc:id="d12ca8dd-0209-4616-9391-0c691c6b005b" config-ref="HTTP_Listener_config" path="/base7"/>
<set-payload value='"Max Mule"' doc:name='Payload = "Max Mule"' doc:id="b62a73ef-25e0-474e-a97c-c7a9a5eb8372" />
<try doc:name="Try" doc:id="1b2f69aa-e5b8-4842-b6a0-59749672290e" >
<validation:is-null doc:name="Is null" doc:id="e20315e4-a784-43c2-85b9-6eefac08b849" value='#["Payload is not null"]'/>
<set-payload doc:name='payload = "modified try payload"' doc:id="390a14a4-e735-4863-abc1-9eb5002eac0e" value='"modified try payload"'/>
<logger level="INFO" doc:name="Logger" doc:id="a7379fe6-7868-4ae7-9910-d02908dd2268" message="#[payload]"/>
<error-handler >
<on-error-propagate enableNotifications="true" logException="true" doc:name="On Error Propagate" doc:id="3c9bab6b-67d7-4cf7-bd68-55b394c4961f" >
<set-payload value="On error propagate - try scope" doc:name='Payload = "On error propagate - try scope"' doc:id="8706db03-03bf-4b19-8d49-1718e55f041f" />
<logger level="INFO" doc:name="Logger" doc:id="d8c34783-8d52-4497-b0bf-1192d231fef8" />

<set-payload doc:name='payload = "modified payload"' doc:id="3110897b-fb01-4740-9134-4971ab9c1a7a" value='"modified payload"'/>
<logger level="INFO" doc:name="Logger" doc:id="5e1048e3-a298-4975-be5f-fbfb912ab626" message="#[payload]"/>
<error-handler >
<on-error-propagate enableNotifications="true" logException="true" doc:name="On Error Propagate" doc:id="938a157e-ee2a-4c9c-ab4d-b8571d0f8f53" >
<set-payload value="On error propagate- parent flow" doc:name='Payload = "On error propagate - parent flow"' doc:id="70efff90-c047-4c9c-bed8-787968a7a3a3" />
<logger level="INFO" doc:name="Logger" doc:id="be3bfb8f-8516-4476-a524-54c11e349d94" />





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

DockerLab proxy performance and IPVS

Why should I use GatsbyJS instead of WordPress and Ghost CMS for build my website

Write small functions

myMessage Launches Phase-I dApp on Zilliqa testnet

Inheritance in constructor in solidity

Handle API call state NICELY

READ/DOWNLOAD*( Principles of Electric Circuits: Conventional Current Version (9th Edition) FULL…

How to get Docker containers running in the SEED-Ubuntu 20.04 VM on VirtualBox

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


More from Medium

How to Generate & Load Test Data for Salesforce?

Rest API Implementation Series on the LEAD

RealTime Salesforce Trigger Scenario #2

Developing with Clicks — The Right Way