# Condition

Selects exactly one control path while passing the input value through.

Canonical URL: https://opennodeflow.dev/wiki/reference-app-core-core-condition/
JSON reference: https://opennodeflow.dev/wiki/reference-app-core-core-condition/index.json
Source snapshot: 2026-10-23

# Condition

Chooses exactly one control route while returning the tested value and boolean result. Use it to gate branch execution; its data output alone does not distinguish the chosen branch.

## Sockets and configuration
- **exec** (control): optional upstream execution gate.
- **value** (any, required): candidate value.
- **true**, **false** (control): exactly one is explicitly emitted.
- **value** (any): unchanged input. **passed** (boolean): comparison result.
- **operator**: truthy (default), equals, greater, less or contains.
- **compare**: comparison value; new instances default to 0 and accept any JSON shape.

## Comparison semantics
truthy uses JavaScript Boolean(value). equals uses strict identity/type equality, not deep object comparison. greater/less convert both operands with Number before comparing. contains converts both operands to strings and uses case-sensitive substring matching; it does not search array membership as structured values.

## Example
For a numeric threshold, set operator greater and compare 80. Wire a reading's number to value, True to the alert's Execute, and False to the normal branch's Execute. Input 80 selects False; 80.1 selects True. Wire the reading data separately to any branch needing it.

The asset logs the boolean outcome only and makes no external calls or state/secret changes. A missing required value fails validation. Unchosen control paths skip; a consumer with only a data wire can still run independently of True/False. Do not create an AND join by wiring both routes into one control input: incoming control routes use OR semantics. There is no next or error output.

## Catalog identity

| Field | Value |
| --- | --- |
| Source key | `app.core.core.condition` |
| Kind | node |
| Family | app-core |
| Pack | See library discovery |

[Integration guide](/wiki/first-workflow/) · [Browse the catalog](/wiki/integration-catalog/)

## Inputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `exec` | Execute | control | No |  |
| `value` | Value | any | Yes |  |

## Outputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `true` | True | control | No |  |
| `false` | False | control | No |  |
| `value` | Value | any | No |  |
| `passed` | Passed | boolean | No |  |

## Configuration schema


```json
{
  "type": "object",
  "properties": {
    "operator": {
      "type": "string",
      "title": "Operator",
      "enum": [
        "truthy",
        "equals",
        "greater",
        "less",
        "contains"
      ],
      "default": "truthy"
    },
    "compare": {
      "title": "Compare with",
      "default": 0
    }
  }
}
```





## Source and installed versions

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See [versioning](/wiki/versioning/), [connections](/wiki/connections/) and [integration setup](/wiki/integration-setup/).

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/catalog-all.mjs`
- `../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs`
- `../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs`
- `shared/seed.ts`
- `shared/storage-library.ts`
- `shared/variable-library.ts`
- `shared/control-flow.ts`
- `shared/remote-routes.ts`
- `server/runtime-library.ts`
- `shared/error-library.ts`
- `shared/storage-model.ts`
- `shared/builtin-documentation.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
