{
  "cells": [
    {
      "id": "start",
      "shape": "start",
      "data": {
        "label": "开始"
      },
      "position": {
        "x": 100,
        "y": 100
      }
    },
    {
      "id": "shell1",
      "shape": "shellTask",
      "data": {
        "label": "准备环境",
        "serviceTask": {
          "fields": {
            "script": "echo 'Preparing environment...'",
            "workDir": "/tmp",
            "env": {
              "ENV": "test"
            }
          }
        },
        "properties": {
          "timeout": 3600,
          "retryCount": 3
        },
        "extensions": {
          "group": "deployment",
          "priority": "high"
        }
      },
      "position": {
        "x": 250,
        "y": 100
      }
    },
    {
      "id": "gateway1",
      "shape": "exclusiveGateway",
      "data": {
        "label": "检查结果"
      },
      "position": {
        "x": 400,
        "y": 100
      }
    },
    {
      "id": "shell2",
      "shape": "shellTask",
      "data": {
        "label": "成功处理",
        "serviceTask": {
          "fields": {
            "script": "echo 'Success!'",
            "workDir": "/tmp"
          }
        }
      },
      "position": {
        "x": 550,
        "y": 50
      }
    },
    {
      "id": "shell3",
      "shape": "shellTask",
      "data": {
        "label": "失败处理",
        "serviceTask": {
          "fields": {
            "script": "echo 'Failed!'",
            "workDir": "/tmp"
          }
        }
      },
      "position": {
        "x": 550,
        "y": 150
      }
    },
    {
      "id": "end",
      "shape": "end",
      "data": {
        "label": "结束"
      },
      "position": {
        "x": 700,
        "y": 100
      }
    },
    {
      "id": "flow1",
      "shape": "edge",
      "source": "start",
      "target": "shell1",
      "data": {
        "label": "开始准备"
      }
    },
    {
      "id": "flow2",
      "shape": "edge",
      "source": "shell1",
      "target": "gateway1",
      "data": {
        "label": "准备完成"
      }
    },
    {
      "id": "flow3",
      "shape": "edge",
      "source": "gateway1",
      "target": "shell2",
      "data": {
        "label": "成功",
        "condition": "${exitCode == 0}"
      }
    },
    {
      "id": "flow4",
      "shape": "edge",
      "source": "gateway1",
      "target": "shell3",
      "data": {
        "label": "失败",
        "condition": "${exitCode != 0}"
      }
    },
    {
      "id": "flow5",
      "shape": "edge",
      "source": "shell2",
      "target": "end",
      "data": {
        "label": "完成"
      }
    },
    {
      "id": "flow6",
      "shape": "edge",
      "source": "shell3",
      "target": "end",
      "data": {
        "label": "完成"
      }
    }
  ]
} 