{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "reference-app-core-core-condition",
  "title": "Condition",
  "section": "Library asset reference",
  "description": "Selects exactly one control path while passing the input value through.",
  "kind": "node",
  "url": "/wiki/reference-app-core-core-condition/",
  "markdown": "/wiki/reference-app-core-core-condition/index.md",
  "json": "/wiki/reference-app-core-core-condition/index.json",
  "headings": [
    {
      "id": "sockets-and-configuration",
      "title": "Sockets and configuration",
      "depth": 2
    },
    {
      "id": "comparison-semantics",
      "title": "Comparison semantics",
      "depth": 2
    },
    {
      "id": "example",
      "title": "Example",
      "depth": 2
    },
    {
      "id": "catalog-identity",
      "title": "Catalog identity",
      "depth": 2
    },
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "outputs",
      "title": "Outputs",
      "depth": 2
    },
    {
      "id": "configuration-schema",
      "title": "Configuration schema",
      "depth": 2
    },
    {
      "id": "source-and-installed-versions",
      "title": "Source and installed versions",
      "depth": 2
    }
  ],
  "sources": [
    "../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"
  ],
  "family": "app-core",
  "contract": {
    "key": "app.core.core.condition",
    "slug": "app-core-core-condition",
    "name": "Condition",
    "kind": "node",
    "family": "app-core",
    "packId": null,
    "category": "Logic",
    "description": "Selects exactly one control path while passing the input value through.",
    "inputs": [
      {
        "id": "exec",
        "name": "Execute",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "value",
        "name": "Value",
        "type": "any",
        "typeName": "Any",
        "required": true
      }
    ],
    "outputs": [
      {
        "id": "true",
        "name": "True",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "false",
        "name": "False",
        "type": "control",
        "typeName": "Control",
        "required": false
      },
      {
        "id": "value",
        "name": "Value",
        "type": "any",
        "typeName": "Any",
        "required": false
      },
      {
        "id": "passed",
        "name": "Passed",
        "type": "boolean",
        "typeName": "Boolean",
        "required": false
      }
    ],
    "configSchema": {
      "type": "object",
      "properties": {
        "operator": {
          "type": "string",
          "title": "Operator",
          "enum": [
            "truthy",
            "equals",
            "greater",
            "less",
            "contains"
          ],
          "default": "truthy"
        },
        "compare": {
          "title": "Compare with",
          "default": 0
        }
      }
    },
    "documentation": "# Condition\n\nChooses 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.\n\n## Sockets and configuration\n- **exec** (control): optional upstream execution gate.\n- **value** (any, required): candidate value.\n- **true**, **false** (control): exactly one is explicitly emitted.\n- **value** (any): unchanged input. **passed** (boolean): comparison result.\n- **operator**: truthy (default), equals, greater, less or contains.\n- **compare**: comparison value; new instances default to 0 and accept any JSON shape.\n\n## Comparison semantics\ntruthy 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.\n\n## Example\nFor 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.\n\nThe 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.",
    "tags": [
      "builtin",
      "node"
    ],
    "source": "app-builtin-catalog"
  }
}
