{"id":36097,"date":"2024-11-26T11:05:49","date_gmt":"2024-11-26T03:05:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/36097\/"},"modified":"2024-11-26T11:05:49","modified_gmt":"2024-11-26T03:05:49","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88-exceptionhandler-%e5%85%a8%e5%b1%80%e5%bc%82%e5%b8%b8%e5%a4%84%e7%90%86%e6%97%a0%e6%b3%95%e6%8d%95%e8%8e%b7-flowableexception-%e5%bc%82%e5%b8%b8%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/36097\/","title":{"rendered":"\u4e3a\u4ec0\u4e48 @ExceptionHandler \u5168\u5c40\u5f02\u5e38\u5904\u7406\u65e0\u6cd5\u6355\u83b7 FlowableException \u5f02\u5e38\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173095327159836.jpg\" class=\"aligncenter\" title=\"\u4e3a\u4ec0\u4e48 @ExceptionHandler \u5168\u5c40\u5f02\u5e38\u5904\u7406\u65e0\u6cd5\u6355\u83b7 FlowableException \u5f02\u5e38\uff1f\u63d2\u56fe\" alt=\"\u4e3a\u4ec0\u4e48 @ExceptionHandler \u5168\u5c40\u5f02\u5e38\u5904\u7406\u65e0\u6cd5\u6355\u83b7 FlowableException \u5f02\u5e38\uff1f\u63d2\u56fe\" \/><\/p>\n<p>\u5728\u5904\u7406\u5f02\u5e38\u65f6\u9047\u5230\u4e86\u95ee\u9898\uff0c\u5c3d\u7ba1\u4f7f\u7528\u4e86 @exceptionhandler \u5168\u5c40\u5f02\u5e38\u5904\u7406\uff0c\u4f46\u662f\u65e0\u6cd5\u6b63\u5e38\u6355\u83b7\u7531 flowableexception \u5f15\u8d77\u7684\u5f02\u5e38\u3002<\/p>\n<p>\u4ee5\u4e0b\u63d0\u4f9b\u95ee\u9898\u7684\u5f02\u5e38\u6808\u4fe1\u606f\uff1a<\/p>\n<pre>org.flowable.common.engine.api.flowableexception: no outgoing sequence flow of element 'wp-871fc117-85d6-479a-9f52-7abf870e854c' could be selected for continuing the process<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b64\u9519\u8bef\u8868\u660e\uff0c\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u627e\u4e0d\u5230\u4e0e\u6d41\u7a0b\u5143\u7d20\u5173\u8054\u7684\u6d41\u51fa\u987a\u5e8f\u6d41\u3002<\/p>\n<p>\u60a8\u63d0\u5230\u5728\u4ee3\u7801\u4e2d\u6dfb\u52a0\u4e86 try-catch \u8bed\u53e5\uff0c\u4f46\u6ca1\u6709\u6355\u83b7\u5230\u5f02\u5e38\u3002\u4e3a\u4e86\u8fdb\u4e00\u6b65\u8c03\u8bd5\u95ee\u9898\uff0c\u9700\u8981\u67e5\u770b\u60a8\u7684 try-catch \u4ee3\u7801\uff1a<\/p>\n<pre>\/\/ \u8bf7\u7c98\u8d34\u6b64\u5904<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u786e\u4fdd try-catch \u8bed\u53e5\u6b63\u786e\u5305\u88f9\u4e86\u629b\u51fa flowableexception \u7684\u4ee3\u7801\uff0c\u5e76\u786e\u4fdd\u6355\u83b7\u7684\u5f02\u5e38\u7c7b\u578b\u6b63\u786e\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>try {\n  \/\/ \u4ee3\u7801\u5757\n} catch (FlowableException e) {\n  \/\/ \u5904\u7406\u5f02\u5e38\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e3a\u4ec0\u4e48 @ExceptionHandler \u5168\u5c40\u5f02\u5e38\u5904\u7406\u65e0\u6cd5\u6355\u83b7 FlowableException \u5f02\u5e38\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5904\u7406\u5f02\u5e38\u65f6\u9047\u5230\u4e86\u95ee\u9898\uff0c\u5c3d\u7ba1\u4f7f\u7528\u4e86 @exceptionhandler \u5168\u5c40\u5f02\u5e38\u5904\u7406\uff0c\u4f46\u662f\u65e0\u6cd5\u6b63\u5e38\u6355\u83b7\u7531 flowableexception \u5f15\u8d77\u7684\u5f02\u5e38\u3002 \u4ee5\u4e0b\u63d0\u4f9b\u95ee\u9898\u7684\u5f02\u5e38\u6808\u4fe1\u606f\uff1a org.flowable.common.engine.api.flowableexception: no outgoing sequence flow of element &#8216;wp-871fc117-85d6-479a-9f52-7abf870e854c&#8217; could be selected for continuing the process \u767b\u5f55\u540e\u590d\u5236 \u6b64\u9519\u8bef\u8868\u660e\uff0c\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u627e\u4e0d\u5230\u4e0e\u6d41\u7a0b\u5143\u7d20\u5173\u8054\u7684\u6d41\u51fa\u987a\u5e8f\u6d41\u3002 \u60a8\u63d0\u5230\u5728\u4ee3\u7801\u4e2d\u6dfb\u52a0\u4e86 try-catch \u8bed\u53e5\uff0c\u4f46\u6ca1\u6709\u6355\u83b7\u5230\u5f02\u5e38\u3002\u4e3a\u4e86\u8fdb\u4e00\u6b65\u8c03\u8bd5\u95ee\u9898\uff0c\u9700\u8981\u67e5\u770b\u60a8\u7684 try-catch \u4ee3\u7801\uff1a \/\/ \u8bf7\u7c98\u8d34\u6b64\u5904 \u767b\u5f55\u540e\u590d\u5236 \u786e\u4fdd try-catch \u8bed\u53e5\u6b63\u786e\u5305\u88f9\u4e86\u629b\u51fa flowableexception \u7684\u4ee3\u7801\uff0c\u5e76\u786e\u4fdd\u6355\u83b7\u7684\u5f02\u5e38\u7c7b\u578b\u6b63\u786e\uff0c\u5982\u4e0b\u6240\u793a\uff1a try { \/\/ \u4ee3\u7801\u5757 } catch (FlowableException e) { \/\/ \u5904\u7406\u5f02\u5e38 } \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662f\u4e3a\u4ec0\u4e48 @ExceptionHandler \u5168\u5c40\u5f02\u5e38\u5904\u7406\u65e0\u6cd5\u6355\u83b7 FlowableException \u5f02\u5e38\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-36097","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=36097"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36097\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=36097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=36097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=36097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}