Hi Husain,
few options
- for failure in your file adapter you can configure local alerting for that interface , that triggers technical alerts for every technical failure
- use pre processing OS command as in the screenshot
- before the start of processing, a failure message will be written to the temp file in OS location for every file transfer.
- after processing the file will be updated with success message.
- in case of file adapter failure, the success message OS command will never execute and your second interface will pick the file with failure message in it.
- you may have to define modification check in the file sender channel in your second interface (say 5 minutes) to allow the file processing to complete for your first interface. to make sure your second interface does not pick failure message as well as success message.
- if your file transfer volume is high, don't use the modification check, and rather use the local alerting mechanism