In mule flow i have a file inbound endpoint which reads .edi files and generates xml files. If any exception is thrown while parsing edi file, i need catch it and send a custom error message to spring controller, from which mule flow is called. How to do this in mule integrated spring project?
Below are my mule flow end points:
<file:inbound-endpoint path="D:\smooks\test docs\in" pollingFrequency="3000" responseTimeout="10000" doc:name="Incoming File" transformer-refs="SmooksTransformer"> <file:filename-regex-filter pattern="(.*).edi" caseSensitive="false" /> </file:inbound-endpoint> <file:outbound-endpoint path="D:\smooks\test docs\out" responseTimeout="10000" doc:name="Outgoing File" outputPattern="#[header:originalFilename].xml"/>