From 94f263d489511d648109af1123da394d3c96e7ed Mon Sep 17 00:00:00 2001 From: chenxing Date: Mon, 12 Oct 2026 17:13:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(condition):=20=E6=96=B0=E5=BB=BA=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E5=88=86=E6=94=AF=E7=BC=BA=E7=9C=81=E7=BF=BB=E8=BD=AC?= =?UTF-8?q?=E4=B8=BA=E8=A1=A8=E8=BE=BE=E5=BC=8F=EF=BC=88EXPRESSION=20?= =?UTF-8?q?=E4=B8=BB=E8=B7=AF=E5=BE=84=EF=BC=89=E2=80=94=E2=80=94=E6=8A=BD?= =?UTF-8?q?=E5=B1=89=E5=88=9D=E5=80=BC+createCondition=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=EF=BC=9BSERVICE=20=E5=88=86=E6=94=AF=E8=A1=A5?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=87=E6=A1=88=EF=BC=88=E4=BB=85=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E4=B8=9A=E5=8A=A1=E6=95=B0=E6=8D=AE=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=EF=BC=8C=E7=AB=AF=E7=82=B9=E4=B8=8E=E7=99=BB?= =?UTF-8?q?=E8=AE=B0=E7=94=B1=E6=B5=81=E7=A8=8B=E4=B8=AD=E5=BF=83=E6=8E=A5?= =?UTF-8?q?=E5=85=A5=E4=BB=B6=20starter=20=E4=BB=A3=E5=8A=9E=EF=BC=89?= =?UTF-8?q?=EF=BC=9B=E6=9D=A5=E6=BA=90=E5=88=97=E6=B3=A8=E9=87=8A=E8=AE=A2?= =?UTF-8?q?=E6=AD=A3=20starter=20=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/flow/admin/Routers.vue | 2 +- .../flow/admin/def-editor/components/ConditionDrawer.vue | 8 +++++++- src/views/flow/admin/def-editor/model.ts | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/views/flow/admin/Routers.vue b/src/views/flow/admin/Routers.vue index 396caed..f861cec 100644 --- a/src/views/flow/admin/Routers.vue +++ b/src/views/flow/admin/Routers.vue @@ -22,7 +22,7 @@ const columns = [ { title: "名称", key: "name", width: 160 }, { title: "服务目录键", key: "serviceKey", width: 110 }, { - // 2026-10-12 SERVICE 收口:reg_app_key 非空=yh-flow-route starter 自注册行(归属应用) + // 2026-10-12 SERVICE 收口:reg_app_key 非空=yh-flow-callback starter 自注册行(归属应用) title: "来源", width: 160, render: (h: any, p: any) => h("span", p.row.regAppKey ? `自注册 · ${p.row.regAppKey}` : "手工"), diff --git a/src/views/flow/admin/def-editor/components/ConditionDrawer.vue b/src/views/flow/admin/def-editor/components/ConditionDrawer.vue index bdf7364..1beea2d 100644 --- a/src/views/flow/admin/def-editor/components/ConditionDrawer.vue +++ b/src/views/flow/admin/def-editor/components/ConditionDrawer.vue @@ -21,7 +21,8 @@ const ctx = inject(EDITOR_CTX)!; const form = reactive({ name: "", routerKey: "", - judgeMode: "SERVICE" as JudgeMode, + // 2026-10-12 SERVICE 收口:新建缺省翻转为表达式(主路径);存量归一化见 syncFromNode(勿动) + judgeMode: "EXPRESSION" as JudgeMode, }); function syncFromNode(): void { @@ -134,6 +135,11 @@ function onRemove(): void {
判断逻辑由业务方实现:引擎运行到该节点时同步调用判断接口,按返回出口名走对应分支
+
+ 仅当判断依赖流程到达时点的实时业务数据时使用;简单条件请用"表达式"(apply 时 formData + 自带判断数据)。判断端点与登记由 + yh-flow-callback-spring-boot-starter(流程中心接入件)自动完成,见《子应用接入流程中心规范》§6.6。 +
diff --git a/src/views/flow/admin/def-editor/model.ts b/src/views/flow/admin/def-editor/model.ts index d92cded..8646fce 100644 --- a/src/views/flow/admin/def-editor/model.ts +++ b/src/views/flow/admin/def-editor/model.ts @@ -177,14 +177,14 @@ export function createParallel(): ParallelNode { return { uid: newUid(), kind: "parallel", branches: [[createApproval()], [createApproval()]] }; } -/** 条件分支:默认 2 分支占位出口名,插入后弹配置抽屉选判断方式(缺省服务) */ +/** 条件分支:默认 2 分支占位出口名,插入后弹配置抽屉选判断方式(2026-10-12 收口:缺省表达式) */ export function createCondition(): ConditionNode { return { uid: newUid(), kind: "condition", name: "条件判断", routerKey: "", - judgeMode: "SERVICE", + judgeMode: "EXPRESSION", conditions: ["", ""], outlets: ["出口一", "出口二"], branches: [[createApproval()], [createApproval()]],