Back to all articlesIntegration reliability

Decide whether old queued work is still worth executing

Alactic Editorial9 min read

Prepared with AI assistance by Alactic Editorial. Examples identified as hypothetical are illustrative, not customer results.

The integration is available again, but its queue contains requests from before the outage: a lookup for a screen nobody is viewing, an update to a record someone has since edited, and several refreshes for the same account. Processing everything could clear the backlog without doing useful work.

The core rule is simple: evaluate business usefulness before executing delayed work. Give tasks explicit decision boundaries, check current evidence, and make non-execution an observable outcome rather than silently deleting requests. A task can be technically eligible for retry while no longer being appropriate to carry out.

The operating model below separates terminal queue outcomes from unresolved business decisions. It is a recommended workflow design, not a claim that any particular product implements these controls.

1. Define the intent before choosing a deadline

Start with the outcome the task should produce, not the endpoint it calls. Requests to the same system can need different delay rules:

  • Temporary lookup: useful while a particular person or workflow is waiting for the answer.
  • Record update: useful while the intended change remains valid against the current record.
  • Periodic snapshot refresh: useful while it improves current-state freshness beyond what completed work already provides.

For each task type, complete this sentence: “This task stops being useful when…” A lookup might become unnecessary when its requesting session ends. An update might become unsafe when its preconditions change. A snapshot refresh might become redundant when a later successful refresh covers its scope.

Distinguish current-state work from distinct business actions. A newer snapshot can sometimes replace an older snapshot. A later action on the same record does not necessarily replace an earlier instruction with a different purpose.

Ask the business owner to approve the rule. Queue age alone cannot determine whether an assignment, lookup, or refresh still matters.

2. Separate revalidation boundaries, deadlines, and states

Use revalidate_after for the point when assumptions require another check. Use useful_until only when there is a genuine hard deadline. Define whether that deadline applies to starting the action or producing its result; starting just before a result deadline may already be too late.

Neither retrying nor moving between queues should restart these clocks. Measure from the business event that created the need, not whichever infrastructure step happened most recently.

This article uses the following state model:

  • Nonterminal queue states: pending execution, waiting for a bounded revalidation attempt, or waiting for replacement evidence. These tasks remain under queue management.
  • Terminal queue dispositions: completed, already_satisfied, expired_not_executed, superseded, and closed_for_review. Automatic workers must not retry these tasks.
  • Separate review cases: an open case records an unresolved decision after a task reaches closed_for_review. The case is not an executable queue item.

A review case must have an owner and a next step. If a reviewer later authorises an action, create a new task with current preconditions and link it to both the case and the original terminal task. Do not reopen the old instruction or reset its timestamp.

3. Use this filled stale-work decision table

Fictional worked example: An integration recovers after delayed processing. All identifiers, times, revisions, and durations below are hypothetical design choices, not recommended defaults or customer results. Times are on the same day in one operating time zone. The table is a filled artifact that a team can adapt for its own task types.

IntentBoundary and rationaleEvidenceDispositionAudit/review notes
A: temporary lookup L-104. Retrieve availability for an active quote screen. Created at 09:00; inspected at 09:18.useful_until: 09:02, a result deadline. The answer supports an immediate screen interaction; a late answer could be confused with a newer request.The requesting screen is closed. No active workflow is waiting on this request identifier.Terminal: expired_not_executed. A returning requester initiates a fresh lookup.No external lookup attempted. Session-state evidence recorded. No review case needed because no dependent workflow remains unresolved.
B: record update U-208. Assign record C-208 to the owner selected in a completed review. Created at 09:00; inspected at 10:10.revalidate_after: 09:15. No hard deadline established. The assignment may remain useful, but later edits can invalidate its preconditions.Expected revision: 12. Current revision: 14, with a different owner. The original review exists, but nothing establishes that it overrides the later assignment.Terminal: closed_for_review. Do not overwrite the current owner.No write attempted. Open separate case R-208, assigned to the record's operational owner. Reviewer must preserve the current assignment or authorise a new task against the current revision.
C: snapshot refresh F-310. Refresh the account's current snapshot; no historical interval required. Created at 09:00; inspected at 09:40.revalidate_after: 09:15, the next scheduled refresh. This is not expiry. Supersession requires a successful later refresh covering the same scope.F-311 completed at 09:32, covered the same account and fields, and its result was accepted by the destination.Terminal: superseded by F-311. No request issued for F-310.Record replacement ID and coverage evidence. If F-311 had failed or never run, F-310 would not be superseded; assess its current usefulness and authority before execution.

Apply Row C step by step: crossing 09:15 triggers inspection, not cancellation. At 09:40, the worker finds evidence that F-311 completed and covered F-310's intent. Only that evidence permits supersession. Without it, the worker must assess whether the original current-snapshot refresh can still run usefully, whether one fresh authorised refresh is needed, or whether uncertainty requires review.

Row B illustrates the separate review model: U-208 is finished as a queue item, while R-208 remains open as a business decision. A later authorised update would receive a new task identifier.

4. Revalidate against current evidence

Revalidation should answer concrete questions: Does the requester still need the result? Does the target exist? Are the original assumptions still true? Has the intended outcome already been achieved? Is execution currently authorised?

For updates, compare the present record with captured preconditions. If the intended state already exists, use already_satisfied rather than writing again. If the record conflicts with a later change, do not assume the delayed instruction takes priority.

A read followed by an unconditional write is not enough: another change can occur between them. Where the destination supports it, use a conditional write tied to the checked revision. If that protection is unavailable and overwriting would be consequential, use controlled review instead.

OWASP's authorization guidance recommends checking permission on every request. A task's presence in a queue is not continuing authority to act. Recheck the relevant permission at execution.

If evidence is unavailable, classify the task as unable to revalidate, not valid. Keep it nonterminal only when another check has a defined time and remains useful. Otherwise close it for review with a separate case.

5. Require coverage before superseding work

A later creation time proves neither completion nor replacement. Supersession requires the same business subject, sufficient scope, and the completion evidence specified by the task's rule.

A newer queued refresh can be a candidate replacement. One design is to keep the older task in a nonterminal waiting state linked to that candidate. When the replacement succeeds, verify coverage before closing the older task. If the replacement fails, reassess the older task rather than treating it as covered.

Waiting also needs a boundary. Define when to inspect an unresolved replacement dependency so it cannot hold work indefinitely. That inspection may lead to execution, another bounded wait, or closure with review; it is not automatic permission to discard either task.

Scope matters. A newer phone-number update does not cover an older owner assignment. A partial refresh may not cover a full snapshot. Work responsible for a distinct historical interval cannot be superseded using a rule intended for current-state snapshots.

Stricter checks may leave more tasks to inspect, but loose matching can erase valid intent.

6. Recover in a controlled sequence

Inspect the backlog before enabling external actions. Then evaluate each task again immediately before execution: work can become stale while waiting behind other recovered requests.

  1. Group by purpose. Identify tasks with clear rules and those lacking usefulness metadata.
  2. Establish previous outcomes. Separate confirmed completions from requests whose last attempt has an unknown result.
  3. Evaluate boundaries and evidence. Check usefulness, preconditions, replacement coverage, and authority.
  4. Act on the decision. Execute eligible work, schedule a bounded evidence check, or assign a terminal disposition.
  5. Handle execution races. If a deadline passes or a precondition changes before the action, reevaluate instead of proceeding on an earlier decision.

An unknown previous result needs special handling. A destination may have accepted a write before the connection failed. Seek destination evidence or use an existing supported duplicate-prevention mechanism. If uncertainty remains consequential, close for review rather than blindly repeating the action.

For legacy tasks, use an explicitly approved temporary policy by task type. Missing metadata is not permission to invent a deadline from age alone. Record which temporary policy governs the decision.

7. Record outcomes and preserve unresolved decisions

The operational record should make the decision understandable without reconstructing worker logs. Capture:

  • Task identifier, purpose, target, creation time, and original requesting workflow.
  • Revalidation boundary, any hard deadline, and policy version.
  • Evaluation time, relevant preconditions, and focused evidence references.
  • Disposition and reason, including whether an external action was attempted and its known outcome.
  • Replacement identifier when superseded, or review-case identifier and owner when closed for review.

A record revision and a reference to the underlying review may be sufficient; avoid copying whole customer records into decision notes.

Terminal dispositions must exclude tasks from automatic retry selection. Separately, review reporting must retain open cases until a reviewer records a resolution. This prevents a closed queue item from hiding an unresolved assignment conflict.

Resolving a case can mean preserving the current state, determining no further action is needed, or authorising a new task. When creating a replacement action, capture fresh preconditions and preserve links to the original decision.

8. Test one rule before applying it broadly

Choose one common task type and adapt the table. Have its business owner approve the intent, boundaries, required evidence, permitted dispositions, and review ownership.

Run a decision-only exercise without sending external requests. Include a changed target, a departed requester, a failed replacement, changed permission, missing evidence, and an uncertain previous outcome. Also test that terminal tasks cannot re-enter retry selection and that open review cases remain assigned.

Inspect disposition counts, tasks lacking evidence, unresolved case age, actions attempted beyond hard deadlines, and supersessions lacking coverage. Use discrepancies to refine the rule before live recovery.

Success means useful, authorised work proceeds, obsolete work does not, and unresolved decisions retain an accountable owner—not merely that the queue becomes empty.

Integration reliabilityQueue recoveryWorkflow operations

Put the next conversation to work.

Explore Alactic Communications for WhatsApp conversations, campaigns and AI-assisted workflows. Choose the product and plan that fit your team.

Explore Communications