请求示例
GET /flowcraft/api/v1/workflows/3/journeys/101
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.xxxxx.yyyyy
Accept: application/json
响应示例 200(张三发起后李四已通过「部门审批」,当前停留在「人事备案」。键名即模型关联名;空关联省略——approve_1 未提交表单,故其 assignment 不含 response 键。moments 为时间线事件,升序)
{
"id": 101,
"status": "processing",
"current_assignment_id": 512,
"graph_path": [],
"created_at": "2026-07-01T09:30:00.000+08:00",
"updated_at": "2026-07-01T14:20:00.000+08:00",
"deadline_at": null,
"proposer": { "id": 42, "name": "张三" },
"current_assignment": { "id": 512, "status": "pending", "vertex_key": "approve_2", "graph_path": [], "completed_at": null, "created_at": "2026-07-01T14:20:00.000+08:00", "updated_at": "2026-07-01T14:20:00.000+08:00", "deadline_at": "2026-07-04T18:00:00.000+08:00", "assignee": { "id": 44, "name": "王五", "type": "User" } },
"assignments": [
{
"id": 510, "status": "proposed", "vertex_key": "begin", "graph_path": [],
"completed_at": "2026-07-01T09:30:00.000+08:00", "created_at": "2026-07-01T09:30:00.000+08:00", "updated_at": "2026-07-01T09:30:00.000+08:00", "deadline_at": null,
"assignee": { "id": 42, "name": "张三", "type": "User" },
"response": {
"id": 301, "user_id": 42, "created_at": "2026-07-01T09:30:00.000+08:00", "updated_at": "2026-07-01T09:30:00.000+08:00",
"entries": [
{ "id": 901, "field_identity_key": "reason", "value": "出差参展", "created_at": "2026-07-01T09:30:00.000+08:00", "updated_at": "2026-07-01T09:30:00.000+08:00" },
{ "id": 902, "field_identity_key": "days", "value": 3, "created_at": "2026-07-01T09:30:00.000+08:00", "updated_at": "2026-07-01T09:30:00.000+08:00" }
]
}
},
{ "id": 511, "status": "approved", "vertex_key": "approve_1", "graph_path": [], "completed_at": "2026-07-01T14:20:00.000+08:00", "created_at": "2026-07-01T09:30:00.000+08:00", "updated_at": "2026-07-01T14:20:00.000+08:00", "deadline_at": null, "assignee": { "id": 43, "name": "李四", "type": "User" } },
{ "id": 512, "status": "pending", "vertex_key": "approve_2", "graph_path": [], "completed_at": null, "created_at": "2026-07-01T14:20:00.000+08:00", "updated_at": "2026-07-01T14:20:00.000+08:00", "deadline_at": "2026-07-04T18:00:00.000+08:00", "assignee": { "id": 44, "name": "王五", "type": "User" } }
],
"workflow_version": {
"id": 12,
"version_number": 2,
"fields_snapshot": [
{ "type": "Field::Text", "title": "请假事由", "identity_key": "reason", "options": [], "required": true, "position": 1, "settings": {} },
{ "type": "Field::Integer", "title": "请假天数", "identity_key": "days", "options": [], "required": true, "position": 2, "settings": {} }
],
"graph": {
"id": 7,
"vertices": [
{
"id": 21, "key": "begin", "type": "Vertex::Begin", "title": "发起",
"position": { "x": 80, "y": 200 },
"user_boundary": { "id": 31, "user_count": 0, "users_preview": [], "organization_count": 0, "organizations": [], "assignee_source": "static", "assignee_source_vertex_key": null },
"parallel_enabled": false, "assignee_selection_enabled": false, "deadline_enabled": true, "delay_request_enabled": false
},
{
"id": 22, "key": "approve_1", "type": "Vertex::Normal", "title": "部门审批",
"position": { "x": 320, "y": 200 },
"user_boundary": { "id": 32, "user_count": 1, "users_preview": [{ "id": 43, "name": "李四" }], "organization_count": 0, "organizations": [], "assignee_source": "static", "assignee_source_vertex_key": null },
"approval_strategy": "any", "approval_threshold": 1, "transfer_enabled": true, "comment_required": false,
"assignee_source": "static", "assignee_source_vertex_key": null,
"parallel_enabled": false, "assignee_selection_enabled": false, "deadline_enabled": true, "delay_request_enabled": false,
"required_branch_count": 1
},
{
"id": 23, "key": "approve_2", "type": "Vertex::Normal", "title": "人事备案",
"position": { "x": 560, "y": 200 },
"user_boundary": { "id": 33, "user_count": 1, "users_preview": [{ "id": 44, "name": "王五" }], "organization_count": 0, "organizations": [], "assignee_source": "static", "assignee_source_vertex_key": null },
"approval_strategy": "any", "approval_threshold": 1, "transfer_enabled": false, "comment_required": false,
"assignee_source": "static", "assignee_source_vertex_key": null,
"parallel_enabled": false, "assignee_selection_enabled": false, "deadline_enabled": true, "delay_request_enabled": false,
"required_branch_count": 1
},
{ "id": 24, "key": "end", "type": "Vertex::End", "title": "结束", "position": { "x": 800, "y": 200 }, "required_branch_count": 1 }
],
"edges": [
{ "id": 41, "key": "edge_1", "source_key": "begin", "target_key": "approve_1", "condition": {} },
{ "id": 42, "key": "edge_2", "source_key": "approve_1", "target_key": "approve_2", "condition": {} },
{ "id": 43, "key": "edge_3", "source_key": "approve_2", "target_key": "end", "condition": {} }
]
}
},
"moments": [
{
"id": 501,
"status": "propose",
"vertex_key": "begin",
"graph_path": [],
"comment": null,
"metadata": { "entry_ids": [901, 902], "next_vertex_keys": [] },
"assignment_id": 510,
"response_id": 301,
"created_at": "2026-07-01T09:30:00.000+08:00",
"actor": { "id": 42, "name": "张三", "type": "User" }
},
{
"id": 502,
"status": "approve",
"vertex_key": "approve_1",
"graph_path": [],
"comment": "同意",
"metadata": { "vertex_title": "部门审批" },
"assignment_id": 511,
"response_id": null,
"created_at": "2026-07-01T14:20:00.000+08:00",
"actor": { "id": 43, "name": "李四", "type": "User" }
}
]
}