- Industry
- Enterprise Integration · Reference Implementation
- My role
- Solution design and reference implementation
- Outcome
- Demonstrates safe recovery from uncertain integration outcomes.
Project highlights
- Stable operation identity and bounded safe retries
- Outcome reconciliation after a lost response
- Traceable recovery states and support controls
A practical reference implementation for safe retries, outcome reconciliation and controlled recovery in IBM BPM / BAW integrations.
Project overview
A workflow can reach the right approval decision and still fail at the integration boundary. The next step may call an ERP, a document service or another enterprise application. If that service becomes unavailable—or completes the action but loses its response—the workflow needs a recovery path that protects the business outcome.
This engineering reference project demonstrates how I approach that problem in IBM BPM and IBM Business Automation Workflow: make the operation identifiable, classify the failure, preserve the evidence and choose a recovery action that is safe for the receiving system. It includes a local, synthetic proof of concept that can be inspected and run independently of a client environment.
Scope: this is a technical reference implementation, not a claim that the exact architecture, examples or safeguards shown here were delivered to a named client. The examples contain no production data. IBM BAW 24.0.x and selected IBM BPM 8.6 documentation provide the platform references; compatibility must be checked against the installed release.
The failure that matters: uncertain completion
Consider an approved request that creates a record in another system. The target commits its record, but the caller never receives confirmation. The workflow now knows that it attempted the call; it does not yet know whether the business action happened. Repeating the request with a new identity can create a duplicate. Marking it failed can leave a successfully completed business action disconnected from the workflow.
The useful question is therefore not “how many retries should we configure?” It is “what can we establish about the effect of this attempt?” A connection error may occur before dispatch, while a timeout can occur after commit. HTTP status codes, SOAP faults and transport exceptions need interpretation alongside the service contract. A generic retry loop cannot resolve that ambiguity.
First principles for safe recovery
| Principle | Design consequence |
|---|---|
| Business intent outlives one attempt | Keep a stable operation identity across retries, restarts and support actions. |
| Missing confirmation is not a negative outcome | Represent uncertainty explicitly and seek authoritative evidence. |
| Retries can repeat side effects | Require safe repeat semantics or reliable proof that the action was not applied. |
| Local rollback has a boundary | Do not assume a BPM transaction reverses an independently committed HTTP action. |
| Recovery is business processing | Authorise, record and monitor recovery actions as carefully as normal execution. |
| A bounded failure is preferable to an endless loop | Use a retry budget, due time and a visible terminal support state. |
For ordinary REST/SOAP calls, this reference design assumes independent commits. A participating distributed transaction can have different semantics, but it must be explicitly supported across the actual boundary. It is not inferred from the words “transactional service flow”.
Reference architecture and ownership

The business process owns the intent and the decision to proceed. A linked integration wrapper maps the request, invokes the configured external operation and normalises the result. A durable operation ledger records what was attempted and what is known about its effect. A recovery coordinator selects a due retry, an outcome lookup or a support review.
The receiving service owns the authoritative business outcome. If it offers idempotency, the contract must define key scope, atomic duplicate handling, request equivalence, retention and the result returned for a repeated request. A request ID added to a header is only correlation unless the receiver actually enforces those semantics.
The ledger belongs in an application-owned persistence layer. Do not add custom tables to IBM-managed schemas or manipulate internal runtime tables to implement application recovery. Protect local status transitions with concurrency control; a UI button that is disabled after one click is not a distributed lock.
Classify errors by meaning and effect certainty

| Observed condition | Interpretation | Reference action |
|---|---|---|
| Confirmed success with reference | Business effect established | Persist success and continue. |
| Business validation rejection | Request cannot proceed unchanged | Return a controlled business outcome; request correction if applicable. |
| Authentication or permission failure | Credential or access issue | Stop and correct the cause; do not loop unchanged. |
| Known no-effect transient failure | Contract/evidence establishes no application | Schedule a bounded retry with the same operation identity. |
| Timeout, connection reset or unclear 5xx | Outcome may be unknown | Reconcile, or replay only under a proven idempotency contract. |
| Unrecognised error or exhausted policy | Evidence or retry budget insufficient | Move to controlled support review. |
A SOAP fault is not automatically a business rejection. A 500 response does not establish that nothing committed. Even when an exception appears retryable, the recovery policy needs to account for the operation’s side effects. The table is a decision framework, not a universal HTTP/SOAP error-code mapping.
Worked example: commit followed by a lost response

The workflow saves an operation identity and an immutable payload fingerprint, reserves an attempt and calls the target. The target applies the action and stores the result. The response then becomes unavailable. The caller records OUTCOME_UNKNOWN rather than inventing either success or a confirmed negative result.
Recovery looks up that same identity. A matching completed result establishes success and supplies the remote reference. A lookup that returns “not found” is safe evidence for a replay only if its contract is authoritative, covers the same identity and rules out delayed or still-running execution. Eventual consistency, short retention and an in-flight request can all make a negative lookup inconclusive.
When the target offers neither trustworthy lookup nor duplicate protection, automatic replay of an ambiguous write may be unsafe. The correct path is investigation and business reconciliation. A compensation, where available, is a separate authorised business action; it is not an invisible rollback of the first call.
Mapping the design into IBM BPM / BAW

Model the invocation inside a service flow called from a process system task. IBM documents external-service calls for REST, web services and other supported integrations. SOAP discovery imports the selected WSDL contract into the designer; the wrapper still needs explicit request, response and fault mapping. [1] [2]
Attach error boundary events to the relevant service or linked service-flow activity. Catch expected faults specifically where possible, normalise their meaning and preserve useful diagnostic data. An outer catch-all can route unexpected errors to investigation; it should not silently return a successful result. IBM also documents service-flow error handling in BPM 8.6. [3] [4]
Use process-level waiting or an approved scheduling mechanism for delays between attempts. Do not keep a server thread occupied with sleep loops. Treat the timer as a wake-up signal, then recheck operation state, budget and due time before the next action. A repeated wake-up must not create a new business operation. [5]
Keep deployment claims precise. BPMN service-flow error handling is not the same as the Failed Event Manager for BPEL/SCA paths or retry options in Advanced mediation primitives. Use those facilities only where that runtime path applies. They do not establish application-level idempotency for an arbitrary REST or SOAP call. [6]
Platform replay is not business retry policy
Event Manager drives scheduled platform work, including timers and UCAs. IBM documents on-hold tasks and supported replay after the underlying cause is resolved. That recovery can repeat work, so assess what the task might invoke before replaying it. A platform re-execution limit is not a complete business retry budget. [7]
If an instance or scheduled task stops progressing, investigate the runtime error and infrastructure condition first. Record its correlation to the application operation, compare the external outcome and use the appropriate supported administration interface. Do not delete internal database rows or move tokens merely to make the instance appear complete. IBM specifically cautions against deleting on-hold work belonging to active instances without understanding the consequences. [7]
The reference approach keeps platform diagnosis and operation recovery visible as two related responsibilities. A successful platform replay is useful only if the resulting business effect is also correct.
Operation identity and service contract
| Element | Purpose | Practical constraint |
|---|---|---|
| operationKey | Stable identity for one logical action | Define tenant, operation and retention scope. |
| payloadFingerprint | Detect incompatible reuse of the key | Define canonical representation and business equivalence. |
| attemptNumber / attemptId | Identify each actual invocation | Never use a new attempt ID as a new business intent. |
| remoteReference | Link to authoritative completion | Validate it against the requested operation. |
| effectCertainty | Describe what is known about application | Distinguish no effect, applied and unknown. |
| policyVersion / nextAttemptAt | Govern recovery over time | Persist the relevant policy and enforce total age and count limits. |
The runnable example fingerprints a deliberately small JSON payload and requires an exact logical match. Real services may use different canonicalisation rules, decimal representations or field exclusions. Agree those rules with the target owner before treating hash equality as evidence of equivalent business intent.
For REST, method semantics inform retry decisions but do not replace the application contract. RFC 9110 cautions against automatic retries of non-idempotent requests without a basis for knowing they are safe. A POST can be protected by an agreed target-side idempotency implementation; SOAP operations need an equivalent explicit contract rather than relying on HTTP method names. [8]
Operation states and transition rules

| State | Permitted next step | Guard |
|---|---|---|
| PENDING | Reserve and invoke | One execution owner; valid immutable input. |
| IN_FLIGHT | Record result, or recover as unknown after interruption | Do not assume an abandoned attempt had no effect. |
| RETRY_WAIT | Invoke when due, or move to review | Replay is safe and budget remains. |
| OUTCOME_UNKNOWN | Query outcome; establish success or safe retry | No new write while evidence is insufficient. |
| SUCCEEDED | Return recorded result | Repeated completion does not create a new effect. |
| BUSINESS_REJECTED | Stop this operation | Correction is a new governed intent. |
| REVIEW_REQUIRED | Investigate and authorise a documented action | No automatic replay after exhaustion. |
A production worker needs transactional reservation or a lease/fencing design appropriate to its database. A lease expiring does not undo a remote call; reclaiming work must handle that uncertainty. The local POC deliberately has one serial execution owner and does not demonstrate distributed worker coordination.
Retry policy, backoff and load protection
For a safely repeatable operation, limit attempts and elapsed recovery time. Backoff and jitter spread retries instead of sending every failed request at the same moment. Respect a documented server retry instruction where applicable, but retain an overall business deadline. Stop retries that can no longer meet that deadline.
Avoid multiplied retry layers. Three attempts in a workflow, an adapter and a gateway can produce far more remote calls than the workflow owner expects. Assign one policy owner for each failure boundary and record which layer performed each attempt. A circuit breaker or concurrency limit can protect a failing dependency, but neither makes an unsafe write safe to repeat.
The POC permits three total write attempts and uses a small exponential delay plus deterministic jitter for reproducible tests. Its CLI advances a synthetic clock; it does not demonstrate wall-clock scheduling, a circuit breaker or a production SLA. Those values illustrate a mechanism and are not recommended defaults.
Practical scenarios and expected recovery
| Use case | Failure mode | Safe design response |
|---|---|---|
| Create an ERP business record | Target commits; confirmation lost | Resolve the original operation and remote reference before progressing. |
| Retrieve reference data | Dependency temporarily unavailable | Retry within freshness/deadline limits; avoid writing fictitious defaults. |
| Generate an approved document | Generation succeeds but link update fails | Find the generated output by operation identity instead of duplicating it. |
| Send a notification | Delivery acknowledgement is missing | Apply provider-specific delivery semantics; do not claim exactly-once receipt. |
| Apply a business update | Target rejects a validation rule | Expose the business reason and route correction; do not retry unchanged. |
These are transferable engineering scenarios, not five separate client implementations. The supplied executable example focuses on one synthetic create operation so its failure states can be verified end to end.
Runnable proof of concept
The package includes a Python standard-library demonstrator with two SQLite files: a local operation ledger and a mock external target. It supports normal completion, a known no-effect transient failure, a committed action with a lost response, a business rejection and repeated failure until the attempt budget is exhausted. The target records a unique operation key and rejects incompatible payload reuse.
The target and ledger commit independently. The lost-response scenario deliberately returns no usable confirmation after the mock target commits. Reopening the ledger preserves the operation identity; abandoned IN_FLIGHT work becomes unknown rather than automatically replaying. A lookup can then reconcile the target result.
This is a deterministic fault simulator, not a live BPM process or a real REST/SOAP server. It contains no bank endpoints, actual users or production payloads. It does not provide enterprise authentication, parallel workers, real network timeouts, a PDF service or a TWX deployment. Its purpose is to make the recovery rules inspectable and testable.
Recovery workspace and operational runbook

- Identify the business operation, process instance and relevant invocation attempts.
- Read the error and distinguish business rejection, platform failure and uncertain remote effect.
- Check authorised target evidence using the original identity and approved support access.
- Record the conclusion and reason before a privileged recovery action.
- Resume only the required work; verify both workflow progression and external outcome.
- Close the incident with a traceable result and review recurring causes.
In production, show safe summaries to business users and detailed diagnostics only to authorised support roles. Mask secrets and sensitive payload values. Separate the right to inspect an operation from the right to retry, reconcile or override it. Preserve recovery reasons and before/after states; a free-form “mark successful” button without evidence is not a resilience feature.
Observability and acceptance evidence
Measure successful outcomes, unknown outcomes, retry age, exhausted operations and time spent in review. Add dependency latency and platform backlog where available. A falling exception count alone can hide swallowed errors; a useful dashboard shows whether business work actually completed.
| Test | Evidence to retain |
|---|---|
| Repeated same intent | Same target reference; one mock effect. |
| Same key, changed payload | Conflict rejected before creating another effect. |
| Lost response after commit | Unknown locally, then success after authoritative lookup. |
| Local interruption after remote commit | Reopened ledger retains key and reconciles outcome. |
| Early retry | No additional attempt before due time. |
| Repeated no-effect failure | Attempt budget ends in support review. |
| Business rejection | No unchanged automatic retry. |
| Lookup unavailable or inconclusive | Operation remains unknown; no write is issued. |
The test results apply to the local reference implementation. Platform acceptance still requires BPM/BAW model tests, real service contracts, infrastructure faults, deployment configuration, role enforcement and business UAT.
Implementation roadmap

| Phase | Deliverable | Exit condition |
|---|---|---|
| Discover | Operation catalogue and side-effect map | Service owners agree lookup and replay semantics. |
| Design | States, identities, error taxonomy and support policy | Lost-response and restart paths are reviewed. |
| Implement | Wrapper, ledger and recovery transitions | One normal and one faulted journey are traceable. |
| Integrate | Platform timer/admin and real service mapping | Version-specific behaviour is verified. |
| Validate | Fault injection, replay and concurrency tests | No unexplained or duplicate business effects. |
| Operate | Metrics, runbook, access and rollout plan | Support team can explain and recover the agreed failures. |
What this project demonstrates
This reference project demonstrates a disciplined integration approach: distinguish business rejection from technical failure, treat uncertainty honestly, preserve operation identity and make recovery a controlled part of the workflow. It shows the reasoning and implementation structure needed to discuss reliability with application owners, platform teams and support engineers.
The goal is a known, traceable business outcome. Retries are one tool for reaching it; reconciliation, explicit waiting and support review are equally important. Client-specific results and verified delivery metrics can be added when they are available.
Technical references
Primary documentation supports the platform statements above. The architecture, application controls and synthetic examples are reference engineering choices, not IBM product guarantees or evidence of a client deployment.
- IBM BAW 24.0.x: calling an external service
- IBM BAW 24.0.x: discovering and invoking a web service
- IBM BAW 24.0.x: catching errors using boundary events
- IBM BPM 8.6: handling errors in service flows
- IBM BAW 24.0.x: delays, escalations and timeouts
- IBM BAW 24.0.x: retry node — Advanced configuration
- IBM BAW 24.0.x: managing on-hold Event Manager tasks
- RFC 9110: HTTP semantics, section 9.2.2