Nodes
Calculate
Computes a value with exact decimals and stores it in a variable.
The Calculate node evaluates one expression and stores the result in a named variable that every later node can read. It is how a flow derives new facts from the payload.
When to use it
- Derive a ratio or a total:
debt / income,price * quantity. - Compute once and reuse: the next conditions and the output read the variable.
How it works
- The expression is evaluated against the payload and the existing variables.
- Arithmetic is exact decimal:
0.1 + 0.2is0.3, so thresholds on money do not drift. - The result is stored under the variable name and the run continues through Next.
Ports
| Port | Taken when |
|---|---|
Next | Always, after the variable is written. |
Configuration
| Field | What it does |
|---|---|
| Name | Label shown on the canvas and in the trace. |
| Variable | Where the result is stored. Reading it later uses this name. |
| Expression | A formula over payload fields, variables and project constants (global.rate). |
What it writes
One variable: vars.<variable>. The trace shows the formula and the value, for example dti = debt / income.
In a real flow
A calculation derives the debt ratio, a condition compares it with the limit, and high ratios go to a manual review before the output.
When it fails
- The expression cannot be evaluated:
EXPRESSION_FAILED. - A missing variable name or expression is an error in Checks.
Good to know
- Writing a variable that already exists replaces it. A variable also shadows a payload field with the same name.
- To build a list, use Append to array.