{"id":447762,"date":"2025-02-11T09:03:33","date_gmt":"2025-02-11T09:03:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=447762"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=447762","title":{"rendered":"<span>\u041a\u0430\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 Camunda: \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u044b\u0439 \u0433\u0430\u0439\u0434<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u041f\u0440\u0438\u0432\u0435\u0442. \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0412\u0435\u0440\u043e\u043d\u0438\u043a\u0430. \u0420\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, <\/strong><a href=\"https:\/\/habr.com\/ru\/companies\/clevertec\/articles\/822333\/\"><strong><u>\u0437\u0430\u0447\u0435\u043c backend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 Camunda<\/u><\/strong><\/a><strong>. \u041d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 <\/strong><a href=\"https:\/\/habr.com\/ru\/companies\/clevertec\/articles\/825722\/\"><strong><u>\u043f\u0440\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 Camunda 8. <\/u><\/strong><\/a><strong>\u0412 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u0440\u0438\u0437\u0432\u0430\u0442\u044c \u0432\u0430\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 Camunda \u0438 \u043d\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e. \u041b\u0430\u0434\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u043f\u0430\u0440\u0430 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u0430 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u0440\u0430\u0437\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438? \u0410 \u0442\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043e\u0442\u043d\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430 \u0434\u0443\u0448\u0435 \u043b\u0435\u0433\u0447\u0435 \u0441\u0442\u0430\u043b\u043e. \u041d\u0435 \u0448\u0443\u0447\u0443, \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0438\u0445 \u043f\u043e\u0447\u0442\u0438 150.\u00a0<br \/><\/strong> <\/p>\n<p><strong>\u041e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445<br \/><\/strong>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e daily routine \u043f\u0435\u0440\u0435\u0434 \u0440\u0430\u0431\u043e\u0442\u043e\u0439.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/9f8\/6fd\/375\/9f86fd375134ced055b33ef4ae1da666.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9f8\/6fd\/375\/9f86fd375134ced055b33ef4ae1da666.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f, \u043f\u043e\u0435\u0441\u0442\u044c \u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0440\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u043c \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u043c? \u041e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0435\u0434\u0435\u0442 \u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u2013 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442\u0441\u044f PM, \u043c\u043e\u043b, \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435-\u0438\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u0438\u0442\u044c \u0447\u0430\u0448\u0435\u0447\u043a\u0443 \u043a\u043e\u0444\u0435, \u044d\u0442\u043e \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043d\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0412\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c error boundary event, \u0447\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0432\u043d\u0435\u0448\u0442\u0430\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u043f\u0440\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b BPMN \u0441\u0445\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.camunda.io\/docs\/components\/modeler\/bpmn\/bpmn-coverage\/\"><u>\u0437\u0434\u0435\u0441\u044c. <\/u><\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2bb\/4af\/67a\/2bb4af67a5925575900c8f8a66bf9be5.png\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2bb\/4af\/67a\/2bb4af67a5925575900c8f8a66bf9be5.png\"\/><\/figure>\n<p>\u041a\u043e\u0434 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043c\u043e\u0435\u043c <a href=\"https:\/\/github.com\/ververesk\/fridayEvening\/commit\/f70f6d3dd2f9fa18ea2f1f60b5713bfd0df228cd#diff-8ee6cd035cbcbfe295e4f4e0f9be0afad7b081f4d70d07b8836677d713457ba6\"><u>\u0433\u0438\u0442\u0435<\/u><\/a>, \u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043c\u0438\u0442. \u0417\u0430\u043c\u0435\u0447\u0443, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 21 Java, Spring Boot \u0432\u0435\u0440\u0441\u0438\u0438 3.3.6, \u0430 \u0442\u0430\u043a\u0436\u0435 spring-zeebe-starter \u0432\u0435\u0440\u0441\u0438\u0438 8.4.12. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code>&lt;dependency&gt;    &lt;groupId&gt;io.camunda&lt;\/groupId&gt;    &lt;artifactId&gt;spring-zeebe-test&lt;\/artifactId&gt;    &lt;version&gt;8.4.12&lt;\/version&gt;    &lt;scope&gt;test&lt;\/scope&gt; &lt;\/dependency&gt;<\/code><\/pre>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435: <em>\u0445\u043e\u0442\u0435\u043b\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043d\u043e\u0432\u0435\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0430\u0447\u0430\u043b \u0441\u043f\u0430\u043c\u0438\u0442\u044c \u043b\u043e\u0433 The request&#8217;s security level does not guarantee that the credentials will be confidential. \u0421 \u0445\u043e\u0434\u0443 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 8.4.12, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043a\u0442\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u043f\u043e\u0431\u0435\u0434\u0438\u043b, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/em><\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0430 \u0434\u043e\u043a\u0435\u0440 \u043a\u043e\u043c\u043f\u043e\u0443\u0437, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435, elasticsearch \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043d\u0435 \u043a\u0430\u0447\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u043e \u0447\u0435\u043c \u044f.<\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432<\/strong><\/p>\n<p>\u041e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0440\u043a\u0435\u0440, \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u0442\u0430\u0441\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0442\u043e \u0432\u044b \u044f\u0432\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c autoComplete = false \u2013 \u0441\u0430\u043c\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u0432\u043e\u0440\u043a\u0435\u0440\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0434\u0430\u0442\u044c \u043a\u043e\u0434\u0443 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c. \u041c\u044b \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0435\u0430\u043a\u0442\u0438\u0432, \u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f next signal \u0438\u043b\u0438 error signal, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d1f\/078\/476\/d1f078476af6c9b3317a58f5cc1cd81e.png\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d1f\/078\/476\/d1f078476af6c9b3317a58f5cc1cd81e.png\"\/><\/figure>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 sendZeebeCompleteCommand, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043d\u0438\u0436\u0435. \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432<a href=\"https:\/\/github.com\/ververesk\/fridayEvening\/commit\/f70f6d3dd2f9fa18ea2f1f60b5713bfd0df228cd#diff-8ee6cd035cbcbfe295e4f4e0f9be0afad7b081f4d70d07b8836677d713457ba6\"> \u0433\u0438\u0442\u0435.  <\/a><\/p>\n<pre><code>public static void sendZeebeCompleteCommand(final JobClient client, long jobKey, ZeebeVariable variable) {    client.newCompleteCommand(jobKey)        .variables(variable)        .send()        .exceptionally(t -&gt; {            log.error(ERROR_EXECUTE_COMMAND, t.getMessage());            throw new ZeebeBpmnError(COMMAND_EXECUTION_EXCEPTION_CODE, COMPLETE_COMMAND_EXCEPTION_MESSAGE, null);        }); } <\/code><\/pre>\n<p>\u0412 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 GodService, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/4dd\/0c7\/8d1\/4dd0c78d1be2feac28384b6a389fb3c5.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4dd\/0c7\/8d1\/4dd0c78d1be2feac28384b6a389fb3c5.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0434\u043b\u044f PM \u0432\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0448\u0430\u0433\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u0434\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0434 1.<em>  <\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/4fd\/740\/023\/4fd74002378f87e856f0821867ded604.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4fd\/740\/023\/4fd74002378f87e856f0821867ded604.jpg\" data-blurred=\"true\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/7a8\/25d\/1ce\/7a825d1ce177547adbeb03515e2f58af.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7a8\/25d\/1ce\/7a825d1ce177547adbeb03515e2f58af.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>MessageSender \u2013 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0432\u0435\u0434\u044c \u043f\u043e \u0441\u0443\u0442\u0438 \u0432 \u0442\u0440\u0435\u0445 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445 \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430. \u041c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c variables \u0432 ApologyMessageData \u0438 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c Error Start Event, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u00a0 \u201c\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u201d.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/874\/0a7\/f6e\/8740a7f6e7ca08e03944b2d0c1547e1f.png\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/874\/0a7\/f6e\/8740a7f6e7ca08e03944b2d0c1547e1f.png\"\/><\/figure>\n<p>\u0418 \u0443\u0436\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0432\u043e\u0440\u043a\u0435\u0440\u0435 \u201c\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u201d \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 apologyCode \u043f\u0440\u0438\u0448\u0435\u043b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/dac\/e48\/335\/dace4833595d97d86ff023a24cb538aa.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dac\/e48\/335\/dace4833595d97d86ff023a24cb538aa.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><strong>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 <\/strong>  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/506\/954\/594\/506954594784b3f3deb49e6ddf7ee7e7.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/506\/954\/594\/506954594784b3f3deb49e6ddf7ee7e7.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u0430\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0432\u0435\u0441\u0438\u0442\u044c \u0434\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0430\u0432\u0442\u043e\u0432\u0430\u0439\u0440\u0438\u0442\u044c ZeebeClient. \u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0422\u043e \u0447\u0442\u043e, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0435\u0441\u0442\u044b.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0431\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u0442\u043e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043e\u043a\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e. \u0412 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u0439\u0434\u0438\u0448\u043d\u0438\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0433\u0434\u0435 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/949\/dbc\/7b2\/949dbc7b2cd613bb06a1567c458b1c13.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/949\/dbc\/7b2\/949dbc7b2cd613bb06a1567c458b1c13.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0423 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u0442\u0438\u043f\u043e\u043c enjoyCupOfCoffeeTask &#8212; ID Activity_08x2kch, \u0430 \u0443 error boundary event &#8212; ID Event_077d3l.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u043a\u0438.<\/p>\n<pre><code>@BeforeEach void prepareMocks() {    when(godService.hasPet()).thenReturn(true);    doNothing().when(godService).getUp();    doNothing().when(godService).haveBreakfast();    doNothing().when(godService).feedPet();    doNothing().when(godService).enjoyCupOfCoffeeTask();    }<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445-\u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 happy path. \u041c\u044b \u043f\u0440\u043e\u0441\u043d\u0443\u043b\u0438\u0441\u044c, \u043f\u043e\u0435\u043b\u0438, \u043f\u043e\u043a\u043e\u0440\u043c\u0438\u043b\u0438 \u043f\u0438\u0442\u043e\u043c\u0446\u0430 \u0438 \u0432\u044b\u043f\u0438\u043b\u0438 \u0447\u0430\u0448\u0435\u0447\u043a\u0443 \u043a\u043e\u0444\u0435. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f PM \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a7\/37f\/3f3\/8a737f3f3432c70383c782bde372517d.png\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a7\/37f\/3f3\/8a737f3f3432c70383c782bde372517d.png\"\/><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 runProcessInstance() \u0438 waitForPassingElement (long processInstanceKey, String elementId)<\/p>\n<pre><code>private ProcessInstanceEvent runProcessInstance() {    return client.newCreateInstanceCommand()        .bpmnProcessId(PROCESS_NAME)        .latestVersion()        .send()        .join(); }  private void waitForPassingElement(long processInstanceKey, String elementId) {    \/\/ \u0436\u0434\u0451\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0440\u043a\u0435\u0440\u0430 60 \u0441\u0435\u043a    waitForProcessInstanceHasPassedElement(processInstanceKey, elementId, Duration.ofSeconds(60)); } <\/code><\/pre>\n<p><strong>\u041f\u043e\u044f\u0441\u043d\u044f\u044e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430<\/strong><\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0436\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 BPMN \u0441\u0445\u0435\u043c\u044b:<\/p>\n<pre><code>waitForPassingElement(processInstanceKey, GET_UP_TASK); waitForPassingElement(processInstanceKey, HAVE_BREAKFAST_TASK); waitForPassingElement(processInstanceKey, FEED_PET_TASK); waitForPassingElement(processInstanceKey, ENJOY_CUP_OF_COFFEE_TASK); <\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0445\u0435\u043c\u044b, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.\u00a0<\/p>\n<pre><code>.hasPassedElementsInOrder(    GET_UP_TASK,    HAVE_BREAKFAST_TASK,    FEED_PET_TASK,    ENJOY_CUP_OF_COFFEE_TASK ) <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0441\u0442\u0430 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b:<\/p>\n<p><em>.isStarted()<\/em><\/p>\n<p>\u0412 \u043d\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432:<br \/><em>.hasNoIncidents()<\/em><\/p>\n<p>\u0418 \u043e\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d:<\/p>\n<p><em>.isCompleted();<\/em><\/p>\n<p>\u0415\u0449\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b error boundary event, error start event \u0438 service task \u0441 \u0442\u0438\u043f\u043e\u043c sendMessageToProjectManagerTask:<\/p>\n<pre><code>.hasNotPassedElement(ZEEBE_ERROR_ENJOY_CUP_OF_COFFEE)  .hasNotPassedElement(ZEEBE_ERROR_SEND_MESSAGE_TO_PM_TASK)  .hasNotPassedElement(SEND_MESSAGE_TO_PM_TASK)<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u201c\u041f\u043e\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435\u201d, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f hasPet \u0438\u043c\u0435\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true. \u042d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u0435:<br \/>.hasVariableWithValue(<em>VARIABLE_HAS_PET<\/em>, true)<\/p>\n<p>\u0412\u0438\u0448\u0435\u043d\u043a\u0430 \u043d\u0430 \u0442\u043e\u0440\u0442\u0435 \u2013 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438:<\/p>\n<pre><code>assertAll(    () -&gt; verify(godService, times(1)).getUp(),    () -&gt; verify(godService, times(1)).haveBreakfast(),    () -&gt; verify(godService, times(1)).feedPet(),    () -&gt; verify(godService, times(1)).enjoyCupOfCoffeeTask() );<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u201c\u041f\u043e\u0435\u0441\u0442\u044c\u201d. \u041a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b error start even \u0438 service task \u0441 \u0442\u0438\u043f\u043e\u043c sendMessageToProjectManagerTask.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/1a3\/434\/9af\/1a34349af8333d51edb6791ffc369abc.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1a3\/434\/9af\/1a34349af8333d51edb6791ffc369abc.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u201c\u041f\u043e\u0435\u0441\u0442\u044c\u201d \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u0430\u0434\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 haveBreakfast(). \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442\u0435\u0441\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u0440\u0430\u0437 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434 \u0432\u043e\u0440\u043a\u0435\u0440\u0430 haveBreakfastTask. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441\u043d\u043e\u0432\u0430 \u0436\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code>waitForPassingElement(processInstanceKey, GET_UP_TASK); waitForPassingElement(processInstanceKey, ZEEBE_ERROR_SEND_MESSAGE_TO_PM_TASK); waitForPassingElement(processInstanceKey, SEND_MESSAGE_TO_PM_TASK);<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438:<\/p>\n<pre><code>.hasPassedElement(GET_UP_TASK) .hasPassedElement(ZEEBE_ERROR_SEND_MESSAGE_TO_PM_TASK) .hasPassedElement(SEND_MESSAGE_TO_PM_TASK)<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u201c\u041f\u043e\u0435\u0441\u0442\u044c\u201d \u041d\u0415 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u043d\u0430\u0447\u0430\u043b \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u2013 \u0441\u0442\u0430\u043b ACTIVATED, \u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 COMPLETED \u043d\u0435 \u043f\u0435\u0440\u0435\u0448\u0435\u043b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u201c\u041f\u043e\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435\u201d \u0438 \u201c\u0412\u044b\u043f\u0438\u0442\u044c \u0447\u0430\u0448\u0435\u0447\u043a\u0443 \u043a\u043e\u0444\u0435\u201d:  <\/p>\n<pre><code>.hasNotPassedElement(HAVE_BREAKFAST_TASK) .hasNotPassedElement(FEED_PET_TASK) .hasNotPassedElement(ENJOY_CUP_OF_COFFEE_TASK) .hasNotPassedElement(ZEEBE_ERROR_ENJOY_CUP_OF_COFFEE) <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b:<\/p>\n<p>.isStarted()<\/p>\n<p>\u0412 \u043d\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432:<br \/>.hasNoIncidents()<\/p>\n<p>\u0418 \u043e\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d:<\/p>\n<p>.isCompleted();<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 apologyCode:<\/p>\n<pre><code>.hasVariableWithValue(VARIABLE_APOLOGY_CODE, ApologyCode.COULD_NOT_HAVE_BREAKFAST.getCode())<\/code><\/pre>\n<p>\u0418 \u043a\u0443\u0434\u0430 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<pre><code>assertAll(    () -&gt; verify(godService, times(1)).getUp(),    () -&gt; verify(godService, times(1)).haveBreakfast(),    () -&gt; verify(godService, never()).feedPet(),    () -&gt; verify(godService, never()).enjoyCupOfCoffeeTask() );<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/camunda-community-hub\/spring-zeebe\"><u>\u0433\u0438\u0442\u0435 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043a\u0430\u043c\u0443\u043d\u0434\u044b<\/u><\/a>. \u0423 \u043c\u0435\u043d\u044f \u0432\u0441\u0435. \u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u044e \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e\u0442 \u0442\u0430\u043a.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a92\/58d\/7d3\/a9258d7d3c49439830348a8c5010e98d.jpg\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a92\/58d\/7d3\/a9258d7d3c49439830348a8c5010e98d.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><strong>\u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e. \u041f\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043e\u0438 \u043c\u044b\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2013 \u043e\u0431\u0441\u0443\u0434\u0438\u043c. <\/strong>  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876264\/\"> https:\/\/habr.com\/ru\/articles\/876264\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u041f\u0440\u0438\u0432\u0435\u0442. \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0412\u0435\u0440\u043e\u043d\u0438\u043a\u0430. \u0420\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0430 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441, <\/strong><a href=\"https:\/\/habr.com\/ru\/companies\/clevertec\/articles\/822333\/\"><strong><u>\u0437\u0430\u0447\u0435\u043c backend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 Camunda<\/u><\/strong><\/a><strong>. \u041d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 <\/strong><a href=\"https:\/\/habr.com\/ru\/companies\/clevertec\/articles\/825722\/\"><strong><u>\u043f\u0440\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 Camunda 8. <\/u><\/strong><\/a><strong>\u0412 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u0440\u0438\u0437\u0432\u0430\u0442\u044c \u0432\u0430\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 Camunda \u0438 \u043d\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e. \u041b\u0430\u0434\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u043f\u0430\u0440\u0430 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u0430 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441 \u0440\u0430\u0437\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438? \u0410 \u0442\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0430 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043e\u0442\u043d\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430 \u0434\u0443\u0448\u0435 \u043b\u0435\u0433\u0447\u0435 \u0441\u0442\u0430\u043b\u043e. \u041d\u0435 \u0448\u0443\u0447\u0443, \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0438\u0445 \u043f\u043e\u0447\u0442\u0438 150.\u00a0<br \/><\/strong> <\/p>\n<p><strong>\u041e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445<br \/><\/strong>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e daily routine \u043f\u0435\u0440\u0435\u0434 \u0440\u0430\u0431\u043e\u0442\u043e\u0439.  <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f, \u043f\u043e\u0435\u0441\u0442\u044c \u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0440\u043c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u043c \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u043c? \u041e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0435\u0434\u0435\u0442 \u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u2013 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442\u0441\u044f PM, \u043c\u043e\u043b, \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435-\u0438\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u0438\u0442\u044c \u0447\u0430\u0448\u0435\u0447\u043a\u0443 \u043a\u043e\u0444\u0435, \u044d\u0442\u043e \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u043d\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0412\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c error boundary event, \u0447\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0432\u043d\u0435\u0448\u0442\u0430\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u043f\u0440\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b BPMN \u0441\u0445\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.camunda.io\/docs\/components\/modeler\/bpmn\/bpmn-coverage\/\"><u>\u0437\u0434\u0435\u0441\u044c. <\/u><\/a><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u043e\u0434 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043c\u043e\u0435\u043c <a href=\"https:\/\/github.com\/ververesk\/fridayEvening\/commit\/f70f6d3dd2f9fa18ea2f1f60b5713bfd0df228cd#diff-8ee6cd035cbcbfe295e4f4e0f9be0afad7b081f4d70d07b8836677d713457ba6\"><u>\u0433\u0438\u0442\u0435<\/u><\/a>, \u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043c\u0438\u0442. \u0417\u0430\u043c\u0435\u0447\u0443, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 21 Java, Spring Boot \u0432\u0435\u0440\u0441\u0438\u0438 3.3.6, \u0430 \u0442\u0430\u043a\u0436\u0435 spring-zeebe-starter \u0432\u0435\u0440\u0441\u0438\u0438 8.4.12. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code>&lt;dependency&gt;    &lt;groupId&gt;io.camunda&lt;\/groupId&gt;    &lt;artifactId&gt;spring-zeebe-test&lt;\/artifactId&gt;    &lt;version&gt;8.4.12&lt;\/version&gt;    &lt;scope&gt;test&lt;\/scope&gt; &lt;\/dependency&gt;<\/code><\/pre>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435: <em>\u0445\u043e\u0442\u0435\u043b\u0430 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043d\u043e\u0432\u0435\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043d\u0430\u0447\u0430\u043b \u0441\u043f\u0430\u043c\u0438\u0442\u044c \u043b\u043e\u0433 The request&#8217;s security level does not guarantee that the credentials will be confidential. \u0421 \u0445\u043e\u0434\u0443 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 8.4.12, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043a\u0442\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0438 \u043f\u043e\u0431\u0435\u0434\u0438\u043b, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/em><\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0430 \u0434\u043e\u043a\u0435\u0440 \u043a\u043e\u043c\u043f\u043e\u0443\u0437, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435, elasticsearch \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043d\u0435 \u043a\u0430\u0447\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u043e \u0447\u0435\u043c \u044f.<\/p>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432<\/strong><\/p>\n<p>\u041e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0440\u043a\u0435\u0440, \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u0442\u0430\u0441\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u0432\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0442\u043e \u0432\u044b \u044f\u0432\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c autoComplete = false \u2013 \u0441\u0430\u043c\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435\u043c \u0432\u043e\u0440\u043a\u0435\u0440\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0434\u0430\u0442\u044c \u043a\u043e\u0434\u0443 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c. \u041c\u044b \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0435\u0430\u043a\u0442\u0438\u0432, \u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f next signal \u0438\u043b\u0438 error signal, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 sendZeebeCompleteCommand, \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043d\u0438\u0436\u0435. \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432<a href=\"https:\/\/github.com\/ververesk\/fridayEvening\/commit\/f70f6d3dd2f9fa18ea2f1f60b5713bfd0df228cd#diff-8ee6cd035cbcbfe295e4f4e0f9be0afad7b081f4d70d07b8836677d713457ba6\"> \u0433\u0438\u0442\u0435.  <\/a><\/p>\n<pre><code>public static void sendZeebeCompleteCommand(final JobClient client, long jobKey, ZeebeVariable variable) {    client.newCompleteCommand(jobKey)        .variables(variable)        .send()        .exceptionally(t -&gt; {            log.error(ERROR_EXECUTE_COMMAND, t.getMessage());            throw new ZeebeBpmnError(COMMAND_EXECUTION_EXCEPTION_CODE, COMPLETE_COMMAND_EXCEPTION_MESSAGE, null);        }); } <\/code><\/pre>\n<p>\u0412 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 GodService, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0434\u043b\u044f PM \u0432\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0448\u0430\u0433\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u0434\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0434 1.<em>  <\/em><\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<p>MessageSender \u2013 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0432\u0435\u0434\u044c \u043f\u043e \u0441\u0443\u0442\u0438 \u0432 \u0442\u0440\u0435\u0445 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445 \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430. \u041c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c variables \u0432 ApologyMessageData \u0438 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c Error Start Event, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u00a0 \u201c\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u201d.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418 \u0443\u0436\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0432\u043e\u0440\u043a\u0435\u0440\u0435 \u201c\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u201d \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 apologyCode \u043f\u0440\u0438\u0448\u0435\u043b.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p><strong>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 <\/strong>  <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0432\u0435\u0441\u0438\u0442\u044c \u0434\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0430\u0432\u0442\u043e\u0432\u0430\u0439\u0440\u0438\u0442\u044c ZeebeClient. \u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0422\u043e \u0447\u0442\u043e, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0435\u0441\u0442\u044b.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0431\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u0442\u043e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043c\u043e\u043a\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e. \u0412 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0430\u0439\u0434\u0438\u0448\u043d\u0438\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0433\u0434\u0435 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c.\u00a0<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0423 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u0442\u0438\u043f\u043e\u043c enjoyCupOfCoffeeTask &#8212; ID Activity_08x2kch, \u0430 \u0443 error boundary event &#8212; ID Event_077d3l.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u043a\u0438.<\/p>\n<pre><code>@BeforeEach void prepareMocks() {    when(godService.hasPet()).thenReturn(true);    doNothing().when(godService).getUp();    doNothing().when(godService).haveBreakfast();    doNothing().when(godService).feedPet();    doNothing().when(godService).enjoyCupOfCoffeeTask();    }<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445-\u0432\u043e\u0440\u043a\u0435\u0440\u0430\u0445.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 happy path. \u041c\u044b \u043f\u0440\u043e\u0441\u043d\u0443\u043b\u0438\u0441\u044c, \u043f\u043e\u0435\u043b\u0438, \u043f\u043e\u043a\u043e\u0440\u043c\u0438\u043b\u0438 \u043f\u0438\u0442\u043e\u043c\u0446\u0430 \u0438 \u0432\u044b\u043f\u0438\u043b\u0438 \u0447\u0430\u0448\u0435\u0447\u043a\u0443 \u043a\u043e\u0444\u0435. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f PM \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 runProcessInstance() \u0438 waitForPassingElement (long processInstanceKey, String elementId)<\/p>\n<pre><code>private ProcessInstanceEvent runProcessInstance() {    return client.newCreateInstanceCommand()        .bpmnProcessId(PROCESS_NAME)        .latestVersion()        .send()        .join(); }  private void waitForPassingElement(long processInstanceKey, String elementId) {    \/\/ \u0436\u0434\u0451\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0440\u043a\u0435\u0440\u0430 60 \u0441\u0435\u043a    waitForProcessInstanceHasPassedElement(processInstanceKey, elementId, Duration.ofSeconds(60)); } <\/code><\/pre>\n<p><strong>\u041f\u043e\u044f\u0441\u043d\u044f\u044e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430<\/strong><\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0436\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 BPMN \u0441\u0445\u0435\u043c\u044b:<\/p>\n<pre><code>waitForPassingElement(processInstanceKey, GET_UP_TASK); waitForPassingElement(processInstanceKey, HAVE_BREAKFAST_TASK); waitForPassingElement(processInstanceKey, FEED_PET_TASK); waitForPassingElement(processInstanceKey, ENJOY_CUP_OF_COFFEE_TASK); <\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0445\u0435\u043c\u044b, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.\u00a0<\/p>\n<pre><code>.hasPassedElementsInOrder(    GET_UP_TASK,    HAVE_BREAKFAST_TASK,    FEED_PET_TASK,    ENJOY_CUP_OF_COFFEE_TASK ) <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0441\u0442\u0430 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b:<\/p>\n<p><em>.isStarted()<\/em><\/p>\n<p>\u0412 \u043d\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432:<br \/><em>.hasNoIncidents()<\/em><\/p>\n<p>\u0418 \u043e\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d:<\/p>\n<p><em>.isCompleted();<\/em><\/p>\n<p>\u0415\u0449\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b error boundary event, error start event \u0438 service task \u0441 \u0442\u0438\u043f\u043e\u043c sendMessageToProjectManagerTask:<\/p>\n<pre><code>.hasNotPassedElement(ZEEBE_ERROR_ENJOY_CUP_OF_COFFEE)  .hasNotPassedElement(ZEEBE_ERROR_SEND_MESSAGE_TO_PM_TASK)  .hasNotPassedElement(SEND_MESSAGE_TO_PM_TASK)<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u201c\u041f\u043e\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435\u201d, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f hasPet \u0438\u043c\u0435\u043b\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true. \u042d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u0435:<br \/>.hasVariableWithValue(<em>VARIABLE_HAS_PET<\/em>, true)<\/p>\n<p>\u0412\u0438\u0448\u0435\u043d\u043a\u0430 \u043d\u0430 \u0442\u043e\u0440\u0442\u0435 \u2013 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438:<\/p>\n<pre><code>assertAll(    () -&gt; verify(godService, times(1)).getUp(),    () -&gt; verify(godService, times(1)).haveBreakfast(),    () -&gt; verify(godService, times(1)).feedPet(),    () -&gt; verify(godService, times(1)).enjoyCupOfCoffeeTask() );<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u201c\u041f\u043e\u0435\u0441\u0442\u044c\u201d. \u041a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b error start even \u0438 service task \u0441 \u0442\u0438\u043f\u043e\u043c sendMessageToProjectManagerTask.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u201c\u041f\u043e\u0435\u0441\u0442\u044c\u201d \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043d\u0430\u0434\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 haveBreakfast(). \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442\u0435\u0441\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u0440\u0430\u0437 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434 \u0432\u043e\u0440\u043a\u0435\u0440\u0430 haveBreakfastTask. <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441\u043d\u043e\u0432\u0430 \u0436\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code>waitForPassingElement(processInstanceKey, GET_UP_TASK); waitForPassingElement(processInstanceKey, ZEEBE_ERROR_SEND_MESSAGE_TO_PM_TASK); waitForPassingElement(processInstanceKey, SEND_MESSAGE_TO_PM_TASK);<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438:<\/p>\n<pre><code>.hasPassedElement(GET_UP_TASK) .hasPassedElement(ZEEBE_ERROR_SEND_MESSAGE_TO_PM_TASK) .hasPassedElement(SEND_MESSAGE_TO_PM_TASK)<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u201c\u041f\u043e\u0435\u0441\u0442\u044c\u201d \u041d\u0415 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u043d\u0430\u0447\u0430\u043b \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u2013 \u0441\u0442\u0430\u043b ACTIVATED, \u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 COMPLETED \u043d\u0435 \u043f\u0435\u0440\u0435\u0448\u0435\u043b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u201c\u041f\u043e\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435\u201d \u0438 \u201c\u0412\u044b\u043f\u0438\u0442\u044c \u0447\u0430\u0448\u0435\u0447\u043a\u0443 \u043a\u043e\u0444\u0435\u201d:  <\/p>\n<pre><code>.hasNotPassedElement(HAVE_BREAKFAST_TASK) .hasNotPassedElement(FEED_PET_TASK) .hasNotPassedElement(ENJOY_CUP_OF_COFFEE_TASK) .hasNotPassedElement(ZEEBE_ERROR_ENJOY_CUP_OF_COFFEE) <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b:<\/p>\n<p>.isStarted()<\/p>\n<p>\u0412 \u043d\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432:<br \/>.hasNoIncidents()<\/p>\n<p>\u0418 \u043e\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d:<\/p>\n<p>.isCompleted();<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 apologyCode:<\/p>\n<pre><code>.hasVariableWithValue(VARIABLE_APOLOGY_CODE, ApologyCode.COULD_NOT_HAVE_BREAKFAST.getCode())<\/code><\/pre>\n<p>\u0418 \u043a\u0443\u0434\u0430 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<pre><code>assertAll(    () -&gt; verify(godService, times(1)).getUp(),    () -&gt; verify(godService, times(1)).haveBreakfast(),    () -&gt; verify(godService, never()).feedPet(),    () -&gt; verify(godService, never()).enjoyCupOfCoffeeTask() );<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/github.com\/camunda-community-hub\/spring-zeebe\"><u>\u0433\u0438\u0442\u0435 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 \u043a\u0430\u043c\u0443\u043d\u0434\u044b<\/u><\/a>. \u0423 \u043c\u0435\u043d\u044f \u0432\u0441\u0435. \u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u044e \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e\u0442 \u0442\u0430\u043a.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p><strong>\u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e. \u041f\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043e\u0438 \u043c\u044b\u0441\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u2013 \u043e\u0431\u0441\u0443\u0434\u0438\u043c. <\/strong>  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876264\/\"> https:\/\/habr.com\/ru\/articles\/876264\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-447762","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/447762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=447762"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/447762\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=447762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=447762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=447762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}