{
  "kind": "open-flow-workflow",
  "version": 1,
  "name": "Approve a customer reply",
  "content": {
    "modelVersion": 14,
    "document": {
      "bindings": {},
      "graph": {
        "nodes": {
          "start": {
            "name": "Start",
            "kind": "start",
            "inputDefs": []
          },
          "review": {
            "inputs": {
              "reply": {
                "kind": "value",
                "value": "Your replacement is ready to ship."
              }
            },
            "name": "Review reply",
            "kind": "approval",
            "inputDefinitions": [
              {
                "jsonSchema": {
                  "type": "string"
                },
                "nullable": false,
                "handle": "reply"
              }
            ],
            "prompt": "Approve the proposed customer reply?"
          },
          "approved": {
            "inputs": {},
            "name": "Approved reply",
            "kind": "task",
            "task": {
              "inputs": [],
              "outputs": [
                {
                  "jsonSchema": {
                    "type": "string"
                  },
                  "nullable": false,
                  "handle": "message"
                }
              ],
              "name": "Approved reply",
              "moduleId": "approved-module",
              "capabilities": [
                {
                  "kind": "connector",
                  "mode": "independent",
                  "actions": []
                }
              ]
            }
          },
          "rejected": {
            "inputs": {},
            "name": "Keep the draft",
            "kind": "task",
            "task": {
              "inputs": [],
              "outputs": [
                {
                  "jsonSchema": {
                    "type": "string"
                  },
                  "nullable": false,
                  "handle": "message"
                }
              ],
              "name": "Keep the draft",
              "moduleId": "rejected-module",
              "capabilities": [
                {
                  "kind": "connector",
                  "mode": "independent",
                  "actions": []
                }
              ]
            }
          }
        },
        "edges": [
          {
            "source": "start",
            "target": "review"
          },
          {
            "source": "review",
            "target": "approved",
            "sourceHandle": "approve"
          },
          {
            "source": "review",
            "target": "rejected",
            "sourceHandle": "reject"
          }
        ]
      }
    },
    "modules": {
      "approved-module": {
        "name": "Approved reply",
        "imports": [],
        "source": "export default () => ({ message: \"Reply approved\" });"
      },
      "rejected-module": {
        "name": "Keep the draft",
        "imports": [],
        "source": "export default () => ({ message: \"Reply needs revision\" });"
      }
    }
  },
  "presentation": {
    "designer": {
      "version": 1,
      "flow": {
        "nodes": {
          "start": {
            "x": 0,
            "y": 150
          },
          "review": {
            "x": 340,
            "y": 150
          },
          "approved": {
            "x": 680,
            "y": 0
          },
          "rejected": {
            "x": 680,
            "y": 300
          }
        }
      }
    }
  }
}
