Merge Wait vs Append Topology Divergence Harness
Loading workflow…
Workflow Description
A fully local harness that pushes the same input set through two topologies: an append path with two Code normalizers for branches A and B, an IF node detecting an explicit empty-branch marker, a NoOp placeholder and a 3-input Merge in append mode; and a simulated wait path whose Code gate forwards records only when every expected branch delivered items. A second Merge joins both outputs and a final Code node returns exactly one divergence report comparing count, keys and values element by element. A Set node appends harness version and guidance. No credentials, no external calls.
How it works
- 1.Manual Trigger fires with one empty item
- 2.Generate Dataset builds fictional records and stamps scenario and expectedBranches on each item
- 3.Branch A Items and Branch B Items normalize fields and carry scenario; empty branch B emits an __emptyBranch marker
- 4.Branch B Is Empty? routes the marker to NoOp and real records to Merge
- 5.Append Merge (append, 3 inputs) collects the append-path output
- 6.Simulated Wait Gate forwards records only if all expected branches arrived, else emits one blocked item
- 7.Merge Both Topologies joins both path outputs
- 8.Compare Topologies returns a single divergence report item
- 9.Divergence Summary adds harness version, schema note and action hint
Use cases
- Verify Merge behaviour before an n8n version upgrade
- Prove which topology yields full output when a branch is empty
- Test multi-branch record normalization and invalid amount detection
- Document merge behaviour when migrating workflows between environments
Requirements
- n8n supporting the listed node typeVersions
- No credentials and no network access
- Replace Generate Dataset with your real source using schema {recordId, branch, label, amount}
- Expected branch list comes from the expectedBranches field
Setup and testing in n8n
- Import the JSON and open the workflow
- Click Execute Workflow and inspect the single Divergence Summary item
- Confirm scenario=deliberate_empty_branch_B, appendRecordCount=2, simulatedWaitRecordCount=0 and divergent=true
- Add a branch B record in Generate Dataset and re-run: the gate should pass and counts should match
- Use a string amount to confirm amountValid=false
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (11)
Manual Trigger
Manual Trigger
Generate Dataset
Code
Branch A Items
Code
Branch B Items
Code
Branch B Is Empty?
If
Empty Branch Placeholder
No Op
Append Merge
Merge
Simulated Wait Gate
Code
Merge Both Topologies
Merge
Compare Topologies
Code
Divergence Summary
Set
Note Overview
Sticky Note
Note Topologies
Sticky Note
Note Report
Sticky Note
Fresh workflows, straight to your inbox
Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.
- New workflows
- Clear overviews
- Setup guides