update 调整变量修改

This commit is contained in:
may
2025-07-25 23:18:28 +08:00
parent 240f10ab45
commit 8d7358e663

View File

@@ -373,6 +373,7 @@ public class FlwInstanceServiceImpl implements IFlwInstanceService {
Map<String, Object> variableMap = new HashMap<>(Optional.ofNullable(flowInstance.getVariableMap()).orElse(Collections.emptyMap())); Map<String, Object> variableMap = new HashMap<>(Optional.ofNullable(flowInstance.getVariableMap()).orElse(Collections.emptyMap()));
if (!variableMap.containsKey(bo.getKey())) { if (!variableMap.containsKey(bo.getKey())) {
log.error("变量不存在: {}", bo.getKey()); log.error("变量不存在: {}", bo.getKey());
return false;
} }
variableMap.put(bo.getKey(), bo.getValue()); variableMap.put(bo.getKey(), bo.getValue());
flowInstance.setVariable(FlowEngine.jsonConvert.objToStr(variableMap)); flowInstance.setVariable(FlowEngine.jsonConvert.objToStr(variableMap));