Skip to content
Data & Databases

Branch Execution Witness Map Before Append Merge With Unified Final Report

16 nodes 171 5 Manual trigger
Download

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. 1.Manual Trigger fires with one empty item
  2. 2.Code node generates three test items: exec-1 with both branches, exec-2 with branch B idle
  3. 3.IF sends branch=A to the true output, everything else to the false output
  4. 4.Set nodes A1,A2,B1,B2 append their name to witness and increment visitCount with includeOtherFields
  5. 5.Two Code nodes compare witnesses to the reference list and compute missingNodes
  6. 6.Append Merge (2 inputs) joins both branch summaries
  7. 7.Code node builds one witness map per executionId with idleBranches and duplicateWitnessNodes
  8. 8.IF on witnessComplete routes to the Complete NoOp and the Quarantine NoOp
  9. 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

  1. Import the JSON and open the workflow
  2. Click Execute Workflow and inspect Emit Final Witness Report
  3. Verify two items: exec-1 with status=complete and exec-2 with status=quarantine
  4. Verify exec-2 has idleBranches=["B"], missingNodes=["B1","B2"], routedTo=quarantine_missing_witnesses
  5. Edge case: delete the branch=B item from the generator and re-run to see a fully idle branch
  6. 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

Manual Trigger Code If Set Merge No Op

Details

Trigger Manual trigger
Nodes 16
Apps 6
Views 171
Downloads 5

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (16)

/

Manual Trigger

Manual Trigger

#1

Generate Branch Test Cases

Code

#2

Route Branch A or B

If

#3

Witness A1

Set

#4

Witness A2

Set

#5

Summarize Branch A Witnesses

Code

#6

Witness B1

Set

#7

Witness B2

Set

#8

Summarize Branch B Witnesses

Code

#9

Merge Branch Witnesses (Append)

Merge

#10

Build Witness Map

Code

#11

Is Witness Map Complete?

If

#12

Complete Witness Maps

No Op

#13

Quarantine Missing Witnesses

No Op

#14

Merge Routed Results (Append)

Merge

#15

Emit Final Witness Report

Code

#16

Note Stage 1

Sticky Note

#17

Note Stage 2

Sticky Note

#18

Note Stage 3

Sticky Note

#19

Note Stage 4

Sticky Note

#20
Stay in the loop

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

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime