Start building

Orchestration

Duplicate detection and sanctions hook

Require an explicit correlated CLEAR from a synthetic sanctions hook, then suppress a duplicate UETR with the native owner/application-scoped outbox. Synthetic local subset; no SWIFT connectivity, CBPR+ certification, sanctions screening or vendor parity is implied.

  • JSON → JSON
  • via REST API
  • Advanced
  • 8 min

Last verified 2026-10-31 at f4ce7d0 — simulation fixtures

Try this template in Studio

Studio activation is a one-time payment of USD 20.

Flow

Drawn at build time from the node positions in the template's process definitions. Numbered markers are the walkthrough stages.

Main processDuplicate detection and sanctions hook8 activities

Scroll sideways to see the whole flow.

Flow diagram of Duplicate detection and sanctions hook8 activities and 7 transitions: Synthetic input, Parse transfer and UETR, Local swift_sanctions_stub hook, Check supported subset and correlation, Enqueue once by UETR, Repeat the same idempotency key, Reject unsupported or mismatched input, Return evidence.Synthetic inputstartParse transfer andUETRswift.mt.parse1Localswift_sanctions_stub…http.request2Check supported subsetand correlationchoiceEnqueue once by UETRoutbox.enqueue3Repeat the sameidempotency keyoutbox.enqueue4Reject unsupported ormismatched inputraise_errorReturn evidenceend
List the 8 activities and 7 transitions

Activities

  1. Synthetic input start
  2. Parse transfer and UETR swift.mt.parse
  3. Local swift_sanctions_stub hook http.request
  4. Check supported subset and correlation choice
  5. Enqueue once by UETR outbox.enqueue
  6. Repeat the same idempotency key outbox.enqueue
  7. Reject unsupported or mismatched input raise_error
  8. Return evidence end

Transitions

  • Synthetic input → Parse transfer and UETR (on success)
  • Parse transfer and UETR → Local swift_sanctions_stub hook (on success)
  • Local swift_sanctions_stub hook → Check supported subset and correlation (on success)
  • Check supported subset and correlation → Enqueue once by UETR (condition)
  • Check supported subset and correlation → Reject unsupported or mismatched input (otherwise)
  • Enqueue once by UETR → Repeat the same idempotency key (on success)
  • Repeat the same idempotency key → Return evidence (on success)

Walkthrough

  1. Parse transfer and UETRRequire an explicit correlated CLEAR from a synthetic sanctions hook, then suppress a duplicate UETR with the native owner/application-scoped outbox.
  2. Local swift_sanctions_stub hookRequire an explicit correlated CLEAR from a synthetic sanctions hook, then suppress a duplicate UETR with the native owner/application-scoped outbox.
  3. Enqueue once by UETRRequire an explicit correlated CLEAR from a synthetic sanctions hook, then suppress a duplicate UETR with the native owner/application-scoped outbox.
  4. Repeat the same idempotency keyRequire an explicit correlated CLEAR from a synthetic sanctions hook, then suppress a duplicate UETR with the native owner/application-scoped outbox.

What you will practise

  • Require an explicit correlated CLEAR from a synthetic sanctions hook, then suppress a duplicate UETR with the native owner/application-scoped outbox.
  • Inspect exact output and rejection cases using synthetic fixtures.
  • Keep external-service acceptance separate from payment settlement.

Sample cases

4 cases with 13 assertions, run with python -m server.integration examples --all in simulation.

Happy path

Passed

Run this synthetic case with isolated local fixtures. Synthetic local subset; no SWIFT connectivity, CBPR+ certification, sanctions screening or vendor parity is implied.

Expected result All declared value, outcome and trace checks must pass.

4/4 assertions

  • Run outcome
  • Verify /first/enqueued
  • Verify /repeated/duplicate
  • Verify /submitted

This sample run only; not a production certification.

Held for review

Expected failure verified

Run this synthetic case with isolated local fixtures. Synthetic local subset; no SWIFT connectivity, CBPR+ certification, sanctions screening or vendor parity is implied.

Expected result All declared value, outcome and trace checks must pass.

3/3 assertions

  • Run outcome
  • Fail closed
  • No effect: enqueue

This sample run only; not a production certification.

Unknown screening

Expected failure verified

Run this synthetic case with isolated local fixtures. Synthetic local subset; no SWIFT connectivity, CBPR+ certification, sanctions screening or vendor parity is implied.

Expected result All declared value, outcome and trace checks must pass.

3/3 assertions

  • Run outcome
  • Fail closed
  • No effect: enqueue

This sample run only; not a production certification.

Hook unavailable

Expected failure verified

Run this synthetic case with isolated local fixtures. Synthetic local subset; no SWIFT connectivity, CBPR+ certification, sanctions screening or vendor parity is implied.

Expected result All declared value, outcome and trace checks must pass.

3/3 assertions

  • Run outcome
  • Fail closed
  • No effect: enqueue

This sample run only; not a production certification.

Prerequisites

Runtime
Cohuno runtime 1.27.0, the version recorded when these cases last passed.
Starter
Manual start; no listener.
Optional dependencies
None beyond the base runtime.
Simulation fixtures
  • swift_sanctions_stub http · http.request
Every sample run replaces these connections with the fixtures defined in its case. A live run needs an operator to configure an authorized connection for each.
Verification details

Provenance

What was verified, and when. The content part changes whenever the pack, a process in its closure, the runtime version or a case result changes; the gallery check then fails until the gallery is regenerated and the changed templates are verified again.

Verified content

Pack SHA-256
8b0327bd77e2d72f477d092d4c30d14a59b17fbc72db7cb87d514c77d3a0c1bd
Closure SHA-256
03b04bd6bdb728d052d1a6e2d73e240e3007f71a721ebb8f4d0c60385340de0d
Runtime
1.27.0
Results
4/4 cases, 13/13 assertions, mode simulate, external calls: none.
Files in the closure
  • server/integration/example_packs/swift_duplicate_sanctions.json
  • server/integration/templates/swift_duplicate_sanctions.json

Verification event

Commit
f4ce7d08eedc90267b405ed1974344153a8b3a34
Verified at (UTC)
2026-10-31T21:19:21Z

How the Cohuno team reproduces this check

PYTHONPATH=. python -m server.integration examples --example swift_duplicate_sanctions
PYTHONPATH=. python scripts/export_public_gallery.py --check