blokboard/ Open beta

EXAMPLE 04 OF 8 · Starter

Keep a balance between runs

Practice saving a wallet balance so the next run can compare it with a new observation.

BrowserStateVariables

Before you begin

  • Use the same workflow copy and Browser runtime for both runs. No wallet or RPC connection is needed for these editable practice balances.

WORKFLOW SNAPSHOT

Keep a balance between runs

5 nodes

Interactive workflow preview loads here. Download the JSON to inspect it in the app.

Import creates an inactive copy. Set your own inputs and connections before running.

Opens as a new, inactive workflow. Review the nodes before running.

Walk through the workflow

  1. Initialize State creates lastBalance with an empty value only if the key is missing.
  2. Observation keeps the previous State value and a sample current balance on this path.
  3. Update State saves the current balance. Result shows the earlier snapshot beside the latest State value.
  4. Run once with currentBalance set to 2. Change it to 1.8 and run again: previousBalance is 2 and savedBalance is 1.8.

Compare two runs

The first run starts with previousBalance empty and saves 2. Change currentBalance in Observation to 1.8 and run again. Initialize State preserves the saved 2; Update State replaces it with 1.8. Result shows both values. A Variable keeps the earlier observation on this path, while State remembers the balance for the next run.

These balances are editable practice inputs. The behavior is the same for a scheduled run.

Start over

Delete lastBalance with Delete State before initialization to start empty again. Changing Initial value alone does not reset an existing key.

Where the value lives

Use the same workflow copy and runtime for both runs. Importing another copy or changing runtimes gives you separate State; exporting a workflow does not carry stored values.