EXAMPLE 02 OF 8 · Starter
Route a sample balance
Compare a fictional balance with a threshold and follow the matching branch. No blockchain call or transaction is made.
Before you begin
- Use the Browser runtime. The balance is sample data; no wallet or RPC access is required.
Walk through the workflow
- Choose Use this workflow and inspect the Variable node. It creates a sample balance of 125 and a threshold of 100.
- The If node checks whether balance is greater than or equal to threshold. Its true and false outputs each lead to a different message.
- Run once. Only the true branch runs, with the message Balance meets the threshold.
- Change the sample balance to 75 and run again. The false branch now produces Balance is below the threshold.
Check both outcomes
| Sample balance | Expected path | Message |
|---|---|---|
| 125 | true | Balance meets the threshold |
| 100 | true | Balance meets the threshold |
| 75 | false | Balance is below the threshold |
The boundary value 100 takes the true path because the operator is greater than or equal to.
Make one change
Change the operator to greater than and repeat the run with balance 100. It should now take the false path.
If it does not match
Inspect the resolved condition and the outgoing port. Only one branch runs per input. A node on the other branch being idle is expected. See If.