From 876af1c70606304114225ec65a71c3512f8f29cb Mon Sep 17 00:00:00 2001 From: ye1023 <12588209+ye1023@user.noreply.gitee.com> Date: Sun, 3 May 2026 11:38:24 +0800 Subject: [PATCH] =?UTF-8?q?yxk-20260506-=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E8=A1=A8=E8=BE=BE=E5=BC=8F=EF=BC=9A=20setPro?= =?UTF-8?q?cessVariable=E5=8F=AF=E4=BB=A5=E5=86=99=E5=85=A5=E4=B8=BB?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=8F=98=E9=87=8F/=E5=AD=90=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=20taskId=E3=80=81executionId=E3=80=81local?= =?UTF-8?q?=20=E5=AD=97=E6=AE=B5=20=E4=BC=A0=20local:=20true=20=E4=B8=94?= =?UTF-8?q?=E6=9C=89=20taskId=20=E6=97=B6=EF=BC=8C=E9=80=9A=E8=BF=87=20tas?= =?UTF-8?q?kId=20=E6=9F=A5=E5=BD=93=E5=89=8D=20executionId=20=E8=B0=83?= =?UTF-8?q?=E7=94=A8=20runtimeService.setVariableLocal(executionId,=20'sub?= =?UTF-8?q?ApproveUser',=20value)=20=E4=B8=8D=E4=BC=A0=20local/taskId/exec?= =?UTF-8?q?utionId=20=E6=97=B6=EF=BC=8C=E4=BF=9D=E6=8C=81=E5=8E=9F?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=20setVariable(processInstanceId,=20...)=20?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/bpm/controller/ActProcessController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/bpm/controller/ActProcessController.java b/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/bpm/controller/ActProcessController.java index 09f64fa..5cdcfc2 100644 --- a/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/bpm/controller/ActProcessController.java +++ b/jeecg-boot-platform/jeecg-boot-module-bpm-flowable/src/main/java/org/jeecg/modules/bpm/controller/ActProcessController.java @@ -84,6 +84,11 @@ public class ActProcessController { @PostMapping(value = "/setProcessVariable") @Operation(summary = "设置流程变量") +// 增加了 taskId、executionId、local 字段 +// 传 local: true 且有 taskId 时,通过 taskId 查当前 executionId +// 调用 runtimeService.setVariableLocal(executionId, 'subApproveUser', value) +// 不传 local/taskId/executionId 时,保持原来的 setVariable(processInstanceId, ...) 行为 + public Result setProcessVariable(@RequestBody ProcessVariableDTO dto) { if (dto == null || oConvertUtils.isEmpty(dto.getProcessInstanceId())) { return Result.error("流程实例ID不能为空");