ssssssss-team/spider-flow · error · RuntimeException
没有找到对应的流程
Error message
没有找到对应的流程
What it means
Thrown by FlowNoticeService.saveOrUpdate when the FlowNotice entity references a flow id that does not exist: spiderFlowMapper.getCountById(entity.getId()) returns 0, so the notice is not attached to any known spider-flow process. The input at fault is entity.getId() — a stale, deleted, or never-persisted flow id passed to the notice-saving endpoint.
Solutions
- Confirm the flow id in the request body corresponds to an existing row in the flow table.
- Refresh the flow list on the client — the flow may have been deleted while the notice form was open.
- Insert or re-import the flow before configuring its notice.
- Return a clear 4xx response to the caller instead of letting the exception bubble up.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at spider-flow-core/src/main/java/org/spiderflow/core/service/FlowNoticeService.java:49 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ssssssss-team/spider-flow@c799cca99c (2026-09-08).
Data as JSON: /api/errors/17733dc4d88eb693.
Report an issue: GitHub.
Appendix: source
Thrown at spider-flow-core/src/main/java/org/spiderflow/core/service/FlowNoticeService.java:49
private static final Logger logger = LoggerFactory.getLogger(FlowNoticeService.class);
@Autowired
private SpiderFlowMapper spiderFlowMapper;
@Autowired
private EmailUtils emailUtils;
@Value("${spider.notice.subject:spider-flow流程通知}")
private String subject;
@Value("${spider.notice.content.start}")
private String startContext;
@Value("${spider.notice.content.end}")
private String endContext;
@Value("${spider.notice.content.exception}")
private String exceptionContext;
@Override
public boolean saveOrUpdate(FlowNotice entity) {
if (spiderFlowMapper.getCountById(entity.getId()) == 0) {
throw new RuntimeException("没有找到对应的流程");
}
return super.saveOrUpdate(entity);
}
/**
* 发送对应的流程通知
*
* @param spiderFlow 流程信息
* @param type 通知类型
* @author BillDowney
* @date 2020年4月4日 上午1:37:50
*/
public void sendFlowNotice(SpiderFlow spiderFlow, FlowNoticeType type) {
FlowNotice notice = baseMapper.selectById(spiderFlow.getId());
if (notice != null && !StringUtils.isEmpty(notice.getRecipients())
&& !StringUtils.isEmpty(notice.getNoticeWay())) {
String content = null;
String sendSubject = this.subject;View on GitHub (pinned to c799cca99c)