Branch Execution Witness Map Before Append Merge With Unified Final Report
Loading workflow…
Workflow Description
A fully local diagnostic template proving which branch nodes actually executed. A Code node generates two-branch test data, an IF splits items into path A and path B, and every Set node appends its own name to an in-data witness array plus a visit counter. Two Code nodes summarize each branch against a reference list, an append Merge joins both inputs, and a Code node builds one witness map per executionId exposing idle branches, missing nodes and duplicate witnesses. An IF routes complete and incomplete maps to separate NoOp paths, a second append Merge rejoins them, and a final Code node emits every map in one output with a routedTo field.
How it works
- 1.Manual Trigger fires with one empty item
- 2.Code node generates three test items: exec-1 with both branches, exec-2 with branch B idle
- 3.IF sends branch=A to the true output, everything else to the false output
- 4.Set nodes A1,A2,B1,B2 append their name to witness and increment visitCount with includeOtherFields
- 5.Two Code nodes compare witnesses to the reference list and compute missingNodes
- 6.Append Merge (2 inputs) joins both branch summaries
- 7.Code node builds one witness map per executionId with idleBranches and duplicateWitnessNodes
- 8.IF on witnessComplete routes to the Complete NoOp and the Quarantine NoOp
- 9.A second append Merge rejoins both NoOp paths and a final Code node emits all maps with routedTo
Use cases
- Prove which idle-branch nodes really ran before trusting a branch-then-merge design
- Diagnose append merge behaviour when only one input arrives
- Audit branching paths before deployment
- Isolate incomplete-evidence executions while keeping them visible in one report
Requirements
- n8n 2.47.x (node types and versions checked against 2.47.7)
- No credentials and no network access required
- Edit REQUIRED_BRANCHES inside Build Witness Map to match your node names
- Replace the generator with your real source emitting executionId, branch and payload
Setup and testing in n8n
- Import the JSON and open the workflow
- Click Execute Workflow and inspect Emit Final Witness Report
- Verify two items: exec-1 with status=complete and exec-2 with status=quarantine
- Verify exec-2 has idleBranches=["B"], missingNodes=["B1","B2"], routedTo=quarantine_missing_witnesses
- Edge case: delete the branch=B item from the generator and re-run to see a fully idle branch
- Edge case: return an empty array from the generator to confirm the workflow does not crash
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 (16)
Manual Trigger
Manual Trigger
Generate Branch Test Cases
Code
Route Branch A or B
If
Witness A1
Set
Witness A2
Set
Summarize Branch A Witnesses
Code
Witness B1
Set
Witness B2
Set
Summarize Branch B Witnesses
Code
Merge Branch Witnesses (Append)
Merge
Build Witness Map
Code
Is Witness Map Complete?
If
Complete Witness Maps
No Op
Quarantine Missing Witnesses
No Op
Merge Routed Results (Append)
Merge
Emit Final Witness Report
Code
Note Stage 1
Sticky Note
Note Stage 2
Sticky Note
Note Stage 3
Sticky Note
Note Stage 4
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