Learn

Architecture & pattern guides

Read the idea, build it on a Grid, prove it in a challenge. Short, practical guides — illustrated with RodGrid's own nodes — on system design, design patterns, flow modeling, and how to get the most out of the app.

All articles

Junctions: Or & Summing

Two circles that look alike and promise opposite things: an Or continues when any incoming path arrives, a Summing Junction once all of them have.

Same lines, different circle

Two lines come down into a circle, and one line leaves it towards a step that opens the roof vents of a greenhouse. At two in the afternoon the temperature passes 32 °C while the humidity sits at a comfortable 60%. Put an Or in that circle and the vents open. Put a Summing Junction in it and they stay shut while the plants heat up. The drawing barely changes, because both symbols are circles.

They make opposite promises. An Or continues when any incoming path arrives. A Summing Junction is its AND counterpart: it continues only once all incoming paths have arrived. Its palette caption, "Combine inputs", does not mention that wait, and the wait is the whole point of the symbol. Together they are the junctions: multi-input nodes, like a Merge, that say something about how their inputs relate.

Either reading opens the vents

Walk the hot afternoon down the diagram. Too hot? answers yes, the path reaches the Or, and the flow continues to Open vents. A humid morning that isn't too hot answers no and then yes, and arrives at the Or's other input with the same result. The chain of questions belongs to Decisions & branching; what matters here is that each Decision takes one exit, so a single reading can send only one path to the circle.

Now swap the Or for a Summing Junction and leave everything else alone. The path arrives and waits for a second one that this reading cannot produce, so the vents do not open on any reading. A Summing Junction on paths that may not all start is the same trap as any join that waits for every path; Gateways: parallel, inclusive & event walks through it with optional branches.

What the word Or adds to a Merge

You could draw that circle as a Merge. It takes the same two edges, and each reading still sends one path down, so the flow would reach Open vents by the same routes. What changes is what the reader is told. A Merge says these paths rejoin here, without saying why; Merge & path convergence covers that generic case. An Or says any one of these is reason enough. When the grower later asks for a third trigger, a request from the panel by the door, whoever opens the flow already knows what kind of thing it is: one more input on the Or.

Both junctions have the same limit as a Merge, up to four inputs on ports in-1 to in-4 and a single output; Merge & path convergence covers what to do past four.

Two checks before the pump

The same controller runs the irrigation pump, and here any is the wrong answer. Before the pump starts, one check reads the tank level and another tests the line pressure. Neither needs the other's result, so they start together from a Split (Split & parallelism covers it). The tank reading comes back first. With an Or where they meet, the pump starts on a pressure nobody has read yet, and the symbol does not say whether the step runs again when the pressure test finishes. A Summing Junction holds the flow until the slower check has finished.

Both checks, then the pump

The junction knows that both checks finished, not how they went, which is why Both OK? sits after it. A Decision inside the tank branch that ended at an alarm would stop that branch from ever arriving, and the junction would go on waiting for it, so let every branch arrive and decide afterwards.

One ticket, three reasons to escalate

Support Ticket Triage has three reasons to escalate: a VIP customer, an SLA at risk and a security-related issue. Give each its own Decision, chained so that each no leads to the next, and send every yes into the one Or; a ticket arrives there at most once. That Challenge's palette has no Summing Junction; for the wait, Alert Evaluation & Auto-Remediation requires one that raises one candidate alert only once every related source has reported.

Practice this