Home / Insights / Fail-proof iFlow design
Designing fail-proof iFlows: retry, error handling and alerting
An interface that works on a good day is easy. The real test is what happens when a receiver is down, a payload is malformed or a certificate expires. These are the patterns we build into iFlows so failures are handled predictably and nothing is lost silently.
1. Classify failures
- Temporary: receiver unavailable, timeout, lock. Retrying later usually works.
- Permanent: invalid data, mapping failure, missing master data. Retrying will not help; the message needs correction.
Handle the two differently. Retrying a permanent error only adds noise.
2. Use an exception subprocess
Add an exception subprocess to every integration process. Use it to capture the error text and payload context, write a clear log entry and route the message to your chosen error path, instead of leaving the default error response.
3. Decouple with JMS for asynchronous retry
For asynchronous scenarios, write the message to a JMS queue and process it from there. The JMS adapter supports retry with configurable intervals, including exponential backoff, and a dead-letter queue for messages that keep failing. This keeps temporary receiver outages from losing data or blocking senders.
4. Park failed messages for review
Where business users must decide what to do, store the failed message and its metadata in a data store or dead-letter queue, and give the support team a documented way to inspect, correct and reprocess it.
5. Make processing idempotent
Retries can deliver the same message twice. Use a stable business key or message ID so that receivers, or your flow, can detect and ignore duplicates.
6. Log what matters
- Set meaningful custom header properties (business keys such as order or document numbers) so messages can be found in monitoring.
- Add message processing log attachments for payloads only where policy allows. Avoid logging sensitive data.
- Keep log text consistent across interfaces.
7. Alert the right people
Send alerts for failed messages and dead-letter growth to the team that can act on them, with the interface name, business key and error text. Avoid alert floods by alerting on aggregated failures where appropriate.
8. Package it as a reusable framework
Put these patterns into a reusable template: shared exception subprocess, standard logging script, naming conventions and configuration externalized as parameters. New interfaces then start with reliability already built in, which is faster and more consistent than rebuilding it each time.
Document the behaviour. For each interface, record the retry intervals, the dead-letter handling and who is alerted. Support teams rely on this during incidents.
Want a reliability review of your interfaces?
Our Integration Review checks existing iFlows against best practices and gives you a prioritized roadmap.
Request a review