Remembering things
Out of the box, each workflow run starts fresh — it remembers nothing from the last one. The moment your idea includes the words "how many times", "last time", or "the list of", you need stored values: durable memory that Juno keeps for your workflow between runs.
Declaring what you'll remember
Stored values are declared up front as part of the workflow, not invented on the fly mid-run. Each declaration answers three questions:
What shape is it?
| Shape | Best for |
|---|---|
| Counter | Numbers that go up and down — warnings, XP, tallies. |
| Value | A single remembered thing — a toggle, a timestamp. |
| Record | A bundle of fields — a member's preferences. |
| List | An ordered collection — a queue, recent entries. |
Who is it about? This is the question that matters most:
- Per server — one value for the whole community. "Is slow mode on?"
- Per member — a separate value for each person, automatically. "How many warnings does this member have?"
- Per channel — a separate value for each channel. "When was this channel last active?"
What does it start as? Every declaration includes a starting value, so your graph never has to handle "not set yet."
Using stored values in the graph
State blocks read and update your declared values. Point the block at a declaration in its configuration, and the per-member or per-channel bookkeeping is automatic — a "add 1 to warnings" block in a moderation flow bumps the counter of whichever member the run is about. No lookups, no keys, no storage code.
Counters deserve a special mention: use a counter's increment rather than read-then-write math. Two runs can touch the same counter at the same moment — two members joining in the same second — and increments are built to land correctly even then.
What to expect operationally
- Stored values survive publishing. Ship version 12 and every counter version 11 accumulated is still there.
- They're part of the workflow. Other workflows can't reach in and edit your values — if you want to share, announce changes as events instead.
- They're visible at teardown. If you ever delete a workflow, Juno shows you how much remembered data would go with it before you confirm (see Monitoring).
Design tip: remember less
The best workflows remember the minimum. Before adding a stored value, ask whether the information is already in the event — the member, the message, the channel all arrive on the trigger for free. Reach for stored values when the past genuinely matters, and give each one a name that says what it means, not how it's stored.