jeecgboot/JeecgBoot · error · JeecgBootException
流程ID不能为空
Error message
流程ID不能为空
What it means
runAiragFlow requires a non-empty flowId on the AiragFlowDTO and validates it with oConvertUtils.isEmpty before delegating to airagFlowService.runFlow. An empty flowId means no AI-RAG flow can be identified, so execution is rejected up front.
Source
Thrown at jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java:2145
query.orderByAsc(SysDepart::getOrgType);
List<SysDepart> sysDepartList = sysDepartService.list(query);
if (!CollectionUtils.isEmpty(sysDepartList)) {
//获取上级公司
SysDepart depart = getParentCompanyByOrgCode(orgCode, sysDepartList, level, 1);
if(depart == null){
depart = sysDepartList.get(0);
}
SysDepartModel respData = new SysDepartModel();
BeanUtils.copyProperties(depart, respData);
return respData;
}
return null;
}
@Override
public Object runAiragFlow(AiragFlowDTO airagFlowDTO) {
if(oConvertUtils.isEmpty(airagFlowDTO.getFlowId())) {
throw new JeecgBootException("流程ID不能为空");
}
Result<Object> o = (Result<Object>)airagFlowService.runFlow(airagFlowDTO);
return o.getResult();
}
@Override
public SseEmitter runAiragFlowStream(AiragFlowDTO airagFlowDTO) {
if (oConvertUtils.isEmpty(airagFlowDTO.getFlowId())) {
throw new JeecgBootException("流程ID不能为空");
}
return airagFlowService.runFlowStream(airagFlowDTO);
}
/**
* uniPush推送消息给APP用户
* @param pushMessageDTO
*/
@OverrideView on GitHub (pinned to 96fb33f5ec)
Solutions
- Set airagFlowDTO.setFlowId(<valid flow id>) before calling runAiragFlow.
- Validate flowId on the caller/controller side and return a clear 400 instead of relying on the service throw.
- Confirm the JSON payload uses the correct field name (flowId) so deserialization populates it.
Example fix
// before
Result<?> r = (Result<?>) sysBaseApi.runAiragFlow(dto); // flowId null
// after
if (oConvertUtils.isEmpty(dto.getFlowId())) {
return Result.error("请选择要执行的AI流程");
}
Result<?> r = (Result<?>) sysBaseApi.runAiragFlow(dto); Defensive patterns
Strategy: validation
Validate before calling
if (oConvertUtils.isEmpty(airagFlowDTO.getFlowId())) {
return Result.error("请选择要执行的AI流程");
}
Result<?> r = (Result<?>) sysBaseApi.runAiragFlow(airagFlowDTO); Type guard
public boolean hasFlowId(AiragFlowDTO dto) {
return dto != null && oConvertUtils.isNotEmpty(dto.getFlowId());
} Try / catch
try {
return sysBaseApi.runAiragFlow(dto);
} catch (JeecgBootException e) {
if ("流程ID不能为空".equals(e.getMessage())) {
return Result.error("flowId 缺失, 请选择流程");
}
throw e;
} Prevention
- Validate flowId in the controller and return HTTP 400 rather than relying on the service throw.
- Confirm the request field name (flowId) matches the DTO so deserialization populates it.
- Disable the run button until a flow is selected on the frontend.
When it happens
Trigger: Calling runAiragFlow with flowId null, empty, or whitespace-only (oConvertUtils.isEmpty treats all three as empty).
Common situations: Frontend did not bind the flow selector; DTO constructed by copy-paste without setting flowId; flow was deleted between page load and submit; JSON field name mismatch (e.g. flow_id vs flowId) leaving the field null after deserialization.
Related errors
AI-assisted analysis of jeecgboot/JeecgBoot@96fb33f5ec (2026-08-14).
Data as JSON: /api/errors/853eec52d4e43486.
Report an issue: GitHub.