{"record":{"id":"17733dc4d88eb693","repo":"ssssssss-team/spider-flow","slug":"error-17733d","errorCode":null,"errorMessage":"没有找到对应的流程","messagePattern":"没有找到对应的流程","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"spider-flow-core/src/main/java/org/spiderflow/core/service/FlowNoticeService.java","lineNumber":49,"sourceCode":"\n\tprivate static final Logger logger = LoggerFactory.getLogger(FlowNoticeService.class);\n\t@Autowired\n\tprivate SpiderFlowMapper spiderFlowMapper;\n\t@Autowired\n\tprivate EmailUtils emailUtils;\n\t@Value(\"${spider.notice.subject:spider-flow流程通知}\")\n\tprivate String subject;\n\t@Value(\"${spider.notice.content.start}\")\n\tprivate String startContext;\n\t@Value(\"${spider.notice.content.end}\")\n\tprivate String endContext;\n\t@Value(\"${spider.notice.content.exception}\")\n\tprivate String exceptionContext;\n\n\t@Override\n\tpublic boolean saveOrUpdate(FlowNotice entity) {\n\t\tif (spiderFlowMapper.getCountById(entity.getId()) == 0) {\n\t\t\tthrow new RuntimeException(\"没有找到对应的流程\");\n\t\t}\n\t\treturn super.saveOrUpdate(entity);\n\t}\n\n\t/**\n\t * 发送对应的流程通知\n\t * \n\t * @param spiderFlow 流程信息\n\t * @param type       通知类型\n\t * @author BillDowney\n\t * @date 2020年4月4日 上午1:37:50\n\t */\n\tpublic void sendFlowNotice(SpiderFlow spiderFlow, FlowNoticeType type) {\n\t\tFlowNotice notice = baseMapper.selectById(spiderFlow.getId());\n\t\tif (notice != null && !StringUtils.isEmpty(notice.getRecipients())\n\t\t\t\t&& !StringUtils.isEmpty(notice.getNoticeWay())) {\n\t\t\tString content = null;\n\t\t\tString sendSubject = this.subject;","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/ssssssss-team/spider-flow/blob/c799cca99c7d064673dc79e6ef06a08bbc0e292d/spider-flow-core/src/main/java/org/spiderflow/core/service/FlowNoticeService.java#L31-L67","documentation":"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.","triggerScenarios":"Thrown at spider-flow-core/src/main/java/org/spiderflow/core/service/FlowNoticeService.java:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c799cca99c7d064673dc79e6ef06a08bbc0e292d","analyzedAt":"2026-09-08T13:47:08.225Z","contentChangedAt":"2026-09-08T13:47:08.225Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}