- New states: waiting (step/task), rejected (step) - New tables: pipeline_human_tasks, pipeline_step_types - New module: step_registry.py — pluggable step_type metadata - New module: human.py — human_complete, approval_approve, approval_reject - Executor: detects interactive step_types, creates human_tasks, enters waiting - Reject with rollback: approval_reject(rollback_to=step) resets steps and re-runs - API: human_task_complete, approval_approve, approval_reject, human_task_list - API: pipeline_step_types, pipeline_register_step_type, pipeline_unregister_step_type - Built-in interactive types: human_task, approval_gate - Updated DDL and appcodes
39 lines
2.3 KiB
JSON
39 lines
2.3 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "pipeline_human_tasks",
|
|
"title": "人工任务表",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "task_id", "title": "产线任务ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "step_name", "title": "步骤名称", "type": "str", "length": 64, "nullable": "no"},
|
|
{"name": "version", "title": "版本号", "type": "int", "nullable": "no", "default": "1"},
|
|
{"name": "task_type", "title": "任务类型", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "assignee_role", "title": "指派角色", "type": "str", "length": 64},
|
|
{"name": "assignee_id", "title": "指派人ID", "type": "str", "length": 32},
|
|
{"name": "form_schema", "title": "表单Schema(JSON)", "type": "longtext"},
|
|
{"name": "result_data", "title": "提交结果(JSON)", "type": "longtext"},
|
|
{"name": "status", "title": "任务状态", "type": "str", "length": 32, "nullable": "no", "default": "pending"},
|
|
{"name": "submitted_by", "title": "提交人ID", "type": "str", "length": 32},
|
|
{"name": "submitted_at", "title": "提交时间", "type": "timestamp"},
|
|
{"name": "comments", "title": "备注", "type": "text"},
|
|
{"name": "created_at", "title": "创建时间", "type": "timestamp", "nullable": "no"},
|
|
{"name": "expired_at", "title": "过期时间", "type": "timestamp"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_pht_task", "idxtype": "index", "idxfields": ["task_id"]},
|
|
{"name": "idx_pht_step", "idxtype": "index", "idxfields": ["task_id", "step_name"]},
|
|
{"name": "idx_pht_role", "idxtype": "index", "idxfields": ["assignee_role"]},
|
|
{"name": "idx_pht_assignee", "idxtype": "index", "idxfields": ["assignee_id"]},
|
|
{"name": "idx_pht_status", "idxtype": "index", "idxfields": ["status"]}
|
|
],
|
|
"codes": [
|
|
{"field": "task_type", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='human_task_type'"},
|
|
{"field": "status", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='human_task_status'"}
|
|
]
|
|
}
|