> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frayme.io/llms.txt
> Use this file to discover all available pages before exploring further.

# condition

> Single boolean gate — smaller scope than rule, simpler than decisionTable.

`condition` is the thinnest predicate node — a single boolean expression with two outbound paths: true and false.

## Configuration

```jsonc theme={null}
{
  "id": "cnd-aml-score",
  "type": "condition",
  "data": {
    "label": "AML Score Check",
    "expression": "aml_aggregate.high_risk_count > 0",
    "trueLabel": "High risk found",
    "falseLabel": "Clear"
  }
}
```

| Field                      | Notes                                                 |
| -------------------------- | ----------------------------------------------------- |
| `expression`               | Boolean expression evaluated against the run context. |
| `trueLabel` / `falseLabel` | Canvas labels for the outbound handles.               |

## Edges

Edges from a `condition` carry `sourceHandle: "true"` or `sourceHandle: "false"`.

```jsonc theme={null}
{
  "id": "e-cond-pass",
  "source": "cnd-aml-score",
  "target": "act-block",
  "sourceHandle": "true"
}
```

## When to use vs rule

|          | condition           | rule                   |
| -------- | ------------------- | ---------------------- |
| Outcomes | Exactly two         | Many, plus else clause |
| Output   | None (pure routing) | Named output fields    |
| Best for | Single yes/no gate  | Multi-outcome lookups  |

`condition` is a stripped-down convenience — every condition can be expressed as a rule with two conditions. The shorthand keeps the canvas readable on simple guards.
