I'm using batch in mule for the first time, not sure how to handle the exceptions for batch records.
Records getting failed input phase, but not able to catch failure exception either in input phase logger and also in Batch step( Failure flow)logger. Perhaps MEL #[inputPhaseException] itself throwing exception.
<batch:job name="Batch1" max-failed-records="-1">
<batch:threading-profile poolExhaustedAction="WAIT"/>
<batch:input>
<file:inbound-endpoint path="C:\IN" responseTimeout="10000" doc:name="File"/>
<component class="com.General" doc:name="Java"/>
<logger message="InputPhase: #[inputPhaseException]" level="INFO" doc:name="Logger"/>
</batch:input>
<batch:process-records>
<batch:step name="Batch_Step" accept-policy="ALL" ">
<data-mapper:transform config-ref="Pojo_To_CSV" doc:name="Pojo To CSV"/>
<file:outbound-endpoint path="C:\Users\OUT" outputPattern="#[function:dateStamp]_product.csv" responseTimeout="10000" doc:name="File"/>
</batch:step>
<batch:step name="FailureFlow" accept-policy="ONLY_FAILURES">
<logger message="Inside Failure: #[getStepExceptions()], Loading Phase: #[failureExceptionForStep],#[inputPhaseException] " level="ERROR" doc:name="Logger"/>
</batch:step>
</batch:process-records>
<batch:on-complete>
<logger level="INFO" doc:name="Logger" message=" On Complete: #[payload.loadedRecords] Loaded Records #[payload.failedRecords] Failed Records"/>
</batch:on-complete>
</batch:job>
Is there is any restriction for batch MEL to be used only inputphase and certain MEL on Process Record and Complete. Because i tried keep most of the get..Exception{} in Failure flow, it is throwing error. Please suggest, Thanks in advance.