{
  "schema_version": 1,
  "bundle_id": "edge-video-gate-example",
  "product_version_id": "edge-video-gate-v1",
  "content_sha256": "609046573749d0bbb1ed4dd78ceb550fe856aa3312525a2e1b06ee1a8831d05a",
  "processes": [
    {
      "key": "vehicle_gate",
      "version": "1",
      "steps": [
        {
          "id": "observe",
          "type": "wait_event",
          "event_type": "edge.vision.observation",
          "result_variable": "vision",
          "next": "plate_read"
        },
        {
          "id": "plate_read",
          "type": "branch",
          "condition": {
            "op": "truthy",
            "left": "{{vars.vision.payload.detections.0.plate}}"
          },
          "on_true": "open_gate",
          "on_false": "observe"
        },
        {
          "id": "open_gate",
          "type": "invoke_command",
          "command_key": "gate.request_open",
          "input": {
            "reason": "plate_read",
            "observation": "{{vars.vision.event_id}}"
          },
          "next": "wait_gate"
        },
        {
          "id": "wait_gate",
          "type": "wait_command",
          "result_variable": "gate_result",
          "next": "reported"
        },
        {
          "id": "reported",
          "type": "emit_event",
          "event_type": "edge.gate.decision",
          "payload": {
            "result": "{{vars.gate_result}}"
          },
          "next": "complete"
        },
        {
          "id": "complete",
          "type": "complete"
        }
      ]
    }
  ]
}
