{
  "artifactVersion": "loop.plan.artifact/v1",
  "compilerVersion": "loop.plan.compiler/v1",
  "apiVersion": "loop.plan/v1",
  "digest": "sha256:b1489dbca06bdffd747d7198cd04688b1f76300c27cd89c38ee5f977e491fc0f",
  "contracts": {
    "input": [],
    "output": [],
    "state": [
      {
        "name": "count",
        "schema": {
          "type": "number",
          "required": false,
          "default": 0,
          "values": [],
          "items": null
        }
      }
    ]
  },
  "entry": {
    "nodeId": "action",
    "port": "in",
    "bindings": []
  },
  "nodes": [
    {
      "id": "action",
      "opcode": "set_variable",
      "inputPorts": [
        {
          "name": "in",
          "contract": []
        }
      ],
      "outputPorts": [
        {
          "name": "completed",
          "contract": []
        },
        {
          "name": "failed",
          "contract": []
        }
      ],
      "stateEffects": {
        "reads": [],
        "writes": [
          "count"
        ]
      },
      "scopePath": [],
      "config": {
        "setVariable": {
          "assignments": [
            {
              "state": "count",
              "value": {
                "op": "length",
                "resultType": "number",
                "args": [
                  {
                    "op": "const",
                    "resultType": "array",
                    "value": [
                      "one",
                      "two"
                    ]
                  }
                ]
              }
            }
          ]
        }
      }
    },
    {
      "id": "failure",
      "opcode": "end.failed",
      "inputPorts": [
        {
          "name": "in",
          "contract": []
        }
      ],
      "outputPorts": [],
      "stateEffects": {
        "reads": [],
        "writes": []
      },
      "scopePath": [],
      "config": {
        "end": {
          "code": "action_failed"
        }
      }
    },
    {
      "id": "success",
      "opcode": "end.succeeded",
      "inputPorts": [
        {
          "name": "in",
          "contract": []
        }
      ],
      "outputPorts": [],
      "stateEffects": {
        "reads": [],
        "writes": []
      },
      "scopePath": [],
      "config": {
        "end": {
          "code": ""
        }
      }
    }
  ],
  "edges": [
    {
      "id": "route_completed",
      "source": {
        "nodeId": "action",
        "port": "completed"
      },
      "target": {
        "nodeId": "success",
        "port": "in"
      },
      "bindings": [],
      "scopeTransitions": []
    },
    {
      "id": "route_failed",
      "source": {
        "nodeId": "action",
        "port": "failed"
      },
      "target": {
        "nodeId": "failure",
        "port": "in"
      },
      "bindings": [],
      "scopeTransitions": []
    }
  ],
  "scopes": []
}
