Files
MiragenFlow/docs/miragenflow-task-lifecycle.json
T

45 lines
3.1 KiB
JSON

{
"schema_version": 1,
"diagram_type": "lifecycle",
"meta": {
"title": "MiragenFlow 任务状态核心机",
"locale": "zh-CN",
"output": "miragenflow-task-lifecycle.html",
"viewBox": [1250, 660],
"quality_profile": "showcase",
"views": [
{ "id": "main-path", "label": "主线状态", "focus": ["created", "reserved", "queued", "running", "succeeded"], "note": "从校验和预留到执行、落地与结算。" },
{ "id": "retry-path", "label": "失败重试", "focus": ["running", "failed", "retrying"], "note": "失败按渠道预算回到执行状态。" },
{ "id": "unknown-path", "label": "未知保护", "focus": ["running", "unknown"], "note": "超时或租约丢失先进入未知状态,等待对账。" }
]
},
"lanes": [
{ "id": "main", "label": "任务主线" },
{ "id": "recovery", "label": "失败与重试" },
{ "id": "reconcile", "label": "未知保护" },
{ "id": "terminal", "label": "终态出口" }
],
"states": [
{ "id": "created", "type": "start", "label": "已创建", "lane": "main", "col": 0, "step": "01" },
{ "id": "reserved", "type": "active", "label": "已预留", "lane": "main", "col": 1, "step": "02" },
{ "id": "queued", "type": "waiting", "label": "排队中", "lane": "main", "col": 2, "step": "03" },
{ "id": "running", "type": "active", "label": "执行中", "lane": "main", "col": 3, "step": "04" },
{ "id": "succeeded", "type": "success", "label": "成功", "lane": "main", "col": 4, "step": "05" },
{ "id": "unknown", "type": "decision", "label": "未知结果", "lane": "reconcile", "col": 2, "yOffset": -80, "width": 110 },
{ "id": "failed", "type": "failure", "label": "失败", "lane": "recovery", "col": 0, "yOffset": 30, "width": 110 },
{ "id": "retrying", "type": "active", "label": "重试中", "lane": "recovery", "col": 1, "yOffset": 30, "width": 110 },
{ "id": "canceled", "type": "failure", "label": "已取消", "lane": "terminal", "col": 2 }
],
"transitions": [
{ "id": "create-reserve", "from": "created", "to": "reserved", "variant": "emphasis" },
{ "id": "reserve-queue", "from": "reserved", "to": "queued", "variant": "emphasis" },
{ "id": "queue-run", "from": "queued", "to": "running", "variant": "emphasis" },
{ "id": "run-success", "from": "running", "to": "succeeded", "variant": "emphasis" },
{ "id": "run-failed", "from": "running", "to": "failed", "variant": "security", "fromSide": "bottom", "toSide": "bottom", "via": [[630, 188], [630, 380], [402, 380]] },
{ "id": "failed-retry", "from": "failed", "to": "retrying", "variant": "emphasis" },
{ "id": "retry-run", "from": "retrying", "to": "running", "variant": "emphasis", "fromSide": "left", "toSide": "bottom", "via": [[480, 337], [480, 188]] },
{ "id": "run-unknown", "from": "running", "to": "unknown", "variant": "security", "fromSide": "top", "toSide": "right", "via": [[556, 80], [820, 80], [820, 227]] },
{ "id": "running-cancel", "from": "running", "to": "canceled", "variant": "security", "fromSide": "top", "toSide": "right", "via": [[556, 64], [880, 64], [880, 479]] }
]
}