{"id":373115,"date":"2024-05-21T05:28:34","date_gmt":"2024-05-21T05:28:34","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=373115"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=373115","title":{"rendered":"<span>\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Flowable \u0441 Spring Boot<\/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>BPMN (<em>\u0430\u043d\u0433\u043b. Business Process Modeling Notation, \u00ab\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432\u00bb<\/em>) \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u044b. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u043e\u0440\u0446\u0438\u0443\u043c\u043e\u043c Object Management Group (OMG).<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0446\u0435\u043b\u044f\u043c\u0438 BPMN \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0437\u0430\u0442\u0440\u0430\u0442 \u0438 \u0441\u0440\u043e\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>Object Management Group \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0430 \u0440\u044f\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u0438 \u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043a\u0430\u043a BPM (\u0430\u043d\u0433\u043b. \u201cBusiness Process Management\u201d, \u00ab\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438\u00bb).<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a Flowable \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u043c \u043e\u0442\u0440\u0430\u0441\u043b\u0435\u0432\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c BPMN 2.0. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 BPM \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u0438 \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<p>BPMN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\/\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f\u043c\u0438. \u041e\u043d \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c12\/5bf\/268\/c125bf268789e02e6bea3765e4afa96d.png\" alt=\"\u0411\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0430 Flowable\" title=\"\u0411\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0430 Flowable\" width=\"720\" height=\"230\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c12\/5bf\/268\/c125bf268789e02e6bea3765e4afa96d.png\"\/><\/p>\n<div><figcaption>\u0411\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0430 Flowable<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435<\/strong> (Start Event) \u2014 \u043e\u0431\u044a\u0435\u043a\u0442 BPMN-\u043f\u043e\u0442\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p><strong>\u041f\u043e\u0442\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/strong> (Sequence Flow) \u2014 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e\u0442\u043e\u043a\u0430. \u041e\u043d\u0438 \u0438\u0433\u0440\u0430\u044e\u0442 \u0440\u043e\u043b\u044c \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430.<\/p>\n<p><strong>\u0428\u043b\u044e\u0437 \u00ab\u0418\u041b\u0418\/\u0418\u041b\u0418\u00bb<\/strong> (\u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439, Exclusive Gateway) \u2014 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3d7\/74f\/8c2\/3d774f8c2e33a0a14faa7ecbe13b85f0.png\" alt=\"\u0418\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0448\u043b\u044e\u0437\" title=\"\u0418\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0448\u043b\u044e\u0437\" width=\"519\" height=\"290\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3d7\/74f\/8c2\/3d774f8c2e33a0a14faa7ecbe13b85f0.png\"\/><\/p>\n<div><figcaption>\u0418\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0448\u043b\u044e\u0437<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 <\/strong>(User Task) \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Admin Maker \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p><strong>\u041a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 <\/strong>(End Event) \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 BPMN-\u043f\u043e\u0442\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043a\u0443 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Spring Boot, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0441 \u0434\u0432\u0438\u0436\u043a\u0430\u043c\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438 Flowable, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u044d\u0440\u043e\u043f\u043e\u0440\u0442\u043e\u043c \u0438\u043b\u0438 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435. \u0412 \u043d\u0451\u043c \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430: \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \/ maker (\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \/ checker (\u0442\u043e\u0442, \u043a\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441). \u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f8d\/ea6\/b12\/f8dea6b1200f3f55036fa7c16fbb14b0.png\" width=\"700\" height=\"278\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f8d\/ea6\/b12\/f8dea6b1200f3f55036fa7c16fbb14b0.png\"\/><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043a\u043e\u0434\u0430:<\/p>\n<p><strong>POM:<\/strong><\/p>\n<p>\u0424\u0430\u0439\u043b pom.xml, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 BPMN.<\/p>\n<pre><code class=\"xml\">&lt;dependency>    &lt;groupId>org.flowable&lt;\/groupId>    &lt;artifactId>flowable5-spring-compatibility&lt;\/artifactId>    &lt;version>${flowable.version}&lt;\/version> &lt;\/dependency><\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u043c \u0434\u0432\u0438\u0436\u043a\u0435 Flowable:<\/p>\n<ul>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;definations><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;process><\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0430\u043c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>&lt;userTask><\/code>, <code>&lt;serviceTask><\/code>, <code>&lt;sequenceFlow><\/code> \u0438 <code>&lt;exclusiveGateway><\/code>.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;startEvent><\/code> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>&lt;userTask><\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p><code>&lt;sequenceFlow><\/code> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p><code>exclusiveGateway<\/code> \u2014 \u0442\u0438\u043f \u0448\u043b\u044e\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435. \u041e\u043d \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u0438\u043d \u0432\u0445\u043e\u0434 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0445\u043e\u0434\u043e\u0432, \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0438 \u0448\u043b\u044e\u0437 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 (true). \u0415\u0441\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><code>endEvent<\/code> \u2014 \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0415\u0433\u043e \u0446\u0435\u043b\u044c \u2014 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0446 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>conditionExpression<\/code> \u2014 \u044d\u0442\u043e \u0431\u0443\u043b\u0435\u0432\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u043c (exclusive) \u0448\u043b\u044e\u0437\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0440\u0430\u0437\u0432\u0435\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?> &lt;definitions  xmlns=\"http:\/\/www.omg.org\/spec\/BPMN\/20100524\/MODEL\"  xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"  xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\"  xmlns:activiti=\"http:\/\/activiti.org\/bpmn\"  xmlns:bpmndi=\"http:\/\/www.omg.org\/spec\/BPMN\/20100524\/DI\"  xmlns:omgdc=\"http:\/\/www.omg.org\/spec\/DD\/20100524\/DC\"  xmlns:omgdi=\"http:\/\/www.omg.org\/spec\/DD\/20100524\/DI\"  typeLanguage=\"http:\/\/www.w3.org\/2001\/XMLSchema\"  expressionLanguage=\"http:\/\/www.w3.org\/1999\/XPath\"  targetNamespace=\"http:\/\/www.activiti.org\/test\">  &lt;process id=\"FlowableProcess\" name=\"FlowableProcess\" isExecutable=\"true\">   &lt;startEvent id=\"startevent1\" name=\"Start\">&lt;\/startEvent>   &lt;userTask id=\"maker\" name=\"maker\" activiti:owner=\"maker\">&lt;\/userTask>   &lt;userTask id=\"checker\" name=\"checker\" activiti:owner=\"checker\">&lt;\/userTask>   &lt;sequenceFlow id=\"Flow_StartToMaker\"    sourceRef=\"startevent1\" targetRef=\"maker\">&lt;\/sequenceFlow>   &lt;exclusiveGateway id=\"MakerExclusivegateway\"    name=\"Exclusive Gateway Maer\">&lt;\/exclusiveGateway>   &lt;sequenceFlow id=\"Flow_MakerToGateway\" sourceRef=\"maker\"    targetRef=\"MakerExclusivegateway\">&lt;\/sequenceFlow>   &lt;sequenceFlow id=\"Flow_MakerGatewayToChecker\"    sourceRef=\"MakerExclusivegateway\" targetRef=\"checker\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${makerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>   &lt;exclusiveGateway id=\"CheckerExclusivegateway\"    name=\"Exclusive Gateway\">&lt;\/exclusiveGateway>   &lt;sequenceFlow id=\"Flow_CheckerToGateway\"    sourceRef=\"checker\" targetRef=\"CheckerExclusivegateway\">&lt;\/sequenceFlow>   &lt;endEvent id=\"endevent\" name=\"End\">&lt;\/endEvent>   &lt;sequenceFlow id=\"Flow_CheckerGatewayToEnd\"    sourceRef=\"CheckerExclusivegateway\" targetRef=\"endevent\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${checkerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>   &lt;sequenceFlow id=\"Flow_MakerGatewayToEnd\"    sourceRef=\"MakerExclusivegateway\" targetRef=\"endevent\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${!makerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>   &lt;sequenceFlow id=\"Flow_CheckerGatewayToMaker\"    sourceRef=\"CheckerExclusivegateway\" targetRef=\"maker\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${!checkerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>  &lt;\/process> &lt;\/definitions><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ef9\/14a\/b52\/ef914ab5252e78730301dc49ef162b3d.png\" width=\"700\" height=\"278\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef9\/14a\/b52\/ef914ab5252e78730301dc49ef162b3d.png\"\/><\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c BPMN flowable \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0436\u0430\u043b\u043e\u0431.<\/p>\n<h3>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440:<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 5 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\n<p><code>@PostMapping(\"maker\/request\/{complain}\")<\/code><em> <\/em>\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI &#171;\/api\/maker\/request\/{complain}&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c <code>complain<\/code> \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0443\u0442\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0451 \u043c\u0435\u0442\u043e\u0434\u0443 <code>flowableService.makerRequest<\/code><em> <\/em>\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p><code>@GetMapping(\"checker\/pending\/tasks\")<\/code><em> <\/em>\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP GET-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI <em>&#171;<\/em>\/api\/checker\/pending\/tasks&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 checker-\u0430 \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>@PostMapping(\"\/checker\/review\/task\/{processId}\/{approve}\")<\/code> \u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 <em>URI <\/em>&#171;\/api\/checker\/review\/task\/{processId}\/{approve}&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0442 <code>processId<\/code> \u0438 <code>approve<\/code> \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0442\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0443 <code>flowableService.checkerReview<\/code> \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p><code>@GetMapping(\"maker\/return\/pending\/tasks\")<\/code> \u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP GET-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI &#171;\/api\/maker\/return\/pending\/tasks&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>@PostMapping(\"\/makerReview\/{complain}\/{processId}\/{approve}\")<\/code><em> <\/em>\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI &#171;\/api\/makerReview\/{complain}\/{processId}\/{approve}&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0442 <code>complain<\/code>, <code>processId<\/code> \u0438 <code>approve<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0438\u0445 \u0432\u043e flowable-\u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 <code>flowableService<\/code> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<pre><code class=\"java\">package com.mediumBlog.Flowabledemo.controller;  import java.util.HashMap; import java.util.Map; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.flowable.engine.ProcessEngine; import org.flowable.engine.RepositoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; import org.flowable.engine.repository.Deployment; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.mediumBlog.Flowabledemo.service.FlowableService;  @RestController @RequestMapping(\"\/api\/\") public class Controller {  @Autowired  private FlowableService flowableService;   \/*   * This api is to initiate a complain request and assign to checker   *\/  @PostMapping(\"maker\/request\/{complain}\")  public String makerRequest(@PathVariable(\"complain\") String complaint) {   String respons = flowableService.makerRequest(complaint);   return respons;  }   \/*   * This api is to get checker pending tasks which are assigned by maker   *\/  @GetMapping(\"checker\/pending\/tasks\")  public Map&lt;String, Object> checkerPending() {   Map&lt;String, Object> response = new HashMap&lt;String, Object>();   response = flowableService.getCheckerPendings();   return response;  }  \/*   * This api is to review the task which are pending at checker    *\/  @PostMapping(\"\/checker\/review\/task\/{processId}\/{approve}\")  public String checkerReviewReview(@PathVariable(\"processId\") String processId,    @PathVariable(\"approve\") Boolean approve) {   String respons = flowableService.checkerReview(processId, approve);   return respons;  }   \/*   * This api is to get maker return pending tasks which are assigned and rejected by checker level   *\/  @GetMapping(\"maker\/return\/pending\/tasks\")  public Map&lt;String, Object> getMakerReturnPendings() {   Map&lt;String, Object> response = new HashMap&lt;String, Object>();   response = flowableService.getMakerReturnPendings();   return response;  }    \/*   * This api is to review the maker return pending tasks which are pending at maker level    *\/   @PostMapping(\"\/makerReview\/{complain}\/{processId}\/{approve}\")  public String makerReviewReturn(@PathVariable(\"complain\") String complain,    @PathVariable(\"processId\") String processId, @PathVariable(\"approve\") Boolean approve) {   String respons = flowableService.makerReviewReturn(complain, processId, approve);   return respons;  }  }<\/code><\/pre>\n<p>\u0421\u0435\u0440\u0432\u0438\u0441:<\/p>\n<pre><code class=\"java\">package com.mediumBlog.Flowabledemo.service;  import java.util.Map;  public interface FlowableService {   public String makerRequest(String complain);  public Map&lt;String,Object> getCheckerPendings();  public String checkerReview(String processId,Boolean review);  public Map&lt;String,Object> getMakerReturnPendings();  public String makerReviewReturn(String complaincomplain,String processId, Boolean review);  }<\/code><\/pre>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>FlowableService<\/code> \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<ul>\n<li>\n<p><code>Deployment<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0444\u043e\u0440\u043c \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0438\u0436\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p><code>RepositoryService<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430\u043c\u0438 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 Flowable. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 API RepositoryService, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0444\u043e\u0440\u043c\u0430\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438.\u00a0<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>createDeployment()<\/code><em> <\/em>\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <code>repositoryService<\/code> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u041c\u0435\u0442\u043e\u0434 <code>addClasspathResource()<\/code><em> <\/em>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 BPMN 2.0 \u0432 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 &#171;flowableProcess.bpmn20.xml&#187; \u0432 <code>classpath<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>startProcessInstanceByKey()<\/code> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0443, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>Task<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u043d\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <code>createTaskQuery()<\/code> \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <code>TaskService<\/code>. \u041c\u0435\u0442\u043e\u0434 <code>processDefinitionKey()<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043b\u044e\u0447 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u0430 \u043c\u0435\u0442\u043e\u0434 <code>processInstanceId(processInstance.getId())<\/code> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>singleResult()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>setVariables(task.getId(), variables)<\/code> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u0433\u0434\u0435 <code>task.getId()<\/code> \u2014 \u044d\u0442\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u0434\u0430\u0447\u0438, \u0430 <code>variables<\/code> \u2014 \u043a\u0430\u0440\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>setVariable(task.getId(), \"makerApproved\", true)<\/code> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e &#171;makerApproved&#187; \u0432 true \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>complete(task.getId())<\/code> \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0448\u0430\u0433\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434<em> <\/em><code>getVariables(task.getId())<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u044b \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u0433\u0434\u0435 <code>task.getId()<\/code> \u2014 \u044d\u0442\u043e id \u0437\u0430\u0434\u0430\u0447\u0438. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0432\u0435\u0440\u043d\u0451\u0442 \u043a\u0430\u0440\u0442\u0443 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u044b \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447 \u2014 \u044d\u0442\u043e \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">package com.mediumBlog.Flowabledemo.serviceImpl;  import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.flowable.task.api.Task; import org.flowable.engine.ProcessEngine; import org.flowable.engine.RepositoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; import org.flowable.engine.repository.Deployment; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.mediumBlog.Flowabledemo.dao.TaskDetails; import com.mediumBlog.Flowabledemo.entity.Complaint; import com.mediumBlog.Flowabledemo.repo.FlowableRepo; import com.mediumBlog.Flowabledemo.service.FlowableService;  @Service public class FlowableServiceImpl implements FlowableService {   @Autowired  private RepositoryService repositoryService;   @Autowired  private RuntimeService runtimeService;  @PersistenceContext  private EntityManager entityManager;  @Autowired  private TaskService taskService;   @Autowired  private FlowableRepo flowableRepo;    ProcessEngine processEngine;   @Override  public String makerRequest(String complain) {   Map&lt;String, Object> variables = new HashMap&lt;String, Object>();   String response = \"\";   try {     Deployment deployment = repositoryService.createDeployment()      .addClasspathResource(\"flowableProcess.bpmn20.xml\").deploy();     ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(\"FlowableProcess\", variables);    Task task = taskService.createTaskQuery().processDefinitionKey(\"FlowableProcess\")      .processInstanceId(processInstance.getId()).singleResult();     variables.put(\"RequestBy\", \"maker\");    variables.put(\"processId\", processInstance.getProcessInstanceId() + \"\");    variables.put(\"complain\", complain);     taskService.setVariables(task.getId(), variables);    taskService.setVariable(task.getId(), \"makerApproved\", true);    taskService.complete(task.getId());    response = \"Succesfully Done with processId :\" + processInstance.getProcessInstanceId() + \"\";    } catch (Exception e) {    \/\/ TODO: handle exception    response = \"Error Occured While Maker Requesting :\" + e.getMessage();    }   return response;  }   @Override  public Map&lt;String, Object> getCheckerPendings() {    Map&lt;String, Object> var = new HashMap&lt;String, Object>();    try {     List&lt;Task> tasks = new ArrayList&lt;Task>();     tasks = taskService.createTaskQuery().processDefinitionKey(\"FlowableProcess\").taskOwner(\"checker\")      .orderByTaskCreateTime().desc().list();     List&lt;TaskDetails> taskList = getTaskDetails(tasks);    var.put(\"data\", taskList);    var.put(\"00\", \"Process Ok\");   } catch (Exception e) {    var.put(\"01\", \"process failed\" + e.getMessage());   }   return var;  }   @Override  public String checkerReview(String processId, Boolean approve) {   String response = \"\";   try {    Task task = taskService.createTaskQuery().processDefinitionKey(\"FlowableProcess\").taskOwner(\"checker\").processInstanceId(processId)      .singleResult();    if (task == null) {     return response = \"There is no task available with processId :\" + processId;    }    \/\/ getting variable data which came from maker    Map&lt;String, Object> variables = taskService.getVariables(task.getId());    String complain = (String) variables.get(\"complain\");    variables.put(\"reviewBy\", \"checker\");    taskService.setVariables(task.getId(), variables);    taskService.setVariable(task.getId(), \"checkerApproved\", approve);    taskService.complete(task.getId());    response = \"Checker Successfully reviewed\";    if(approve==true){     Complaint complaint = new Complaint();     complaint.setComplaint(variables.get(\"complain\")+\"\");      complaint.setComplaintInitiator(variables.get(\"RequestBy\")+\"\");     complaint.setComplaintApprover(variables.get(\"reviewBy\")+\"\");     complaint.setDate(new Date());     flowableRepo.save(complaint);     }      } catch (Exception e) {    response = \"Error Occured While Maker Requesting :\" + e.getMessage();   }    return response;  }   @Override  public Map&lt;String, Object> getMakerReturnPendings() {      Map&lt;String, Object> var = new HashMap&lt;String, Object>();    try {     List&lt;Task> tasks = new ArrayList&lt;Task>();     tasks = taskService.createTaskQuery().processDefinitionKey(\"FlowableProcess\").taskOwner(\"maker\")      .orderByTaskCreateTime().desc().list();     List&lt;TaskDetails> taskList = getTaskDetails(tasks);    var.put(\"data\", taskList);    var.put(\"00\", \"Process Ok\");   } catch (Exception e) {    var.put(\"01\", \"process failed\" + e.getMessage());   }   return var;  }   @Override  public String makerReviewReturn(String complain,String processId, Boolean approve) {   String response = \"\";   try {    Task task = taskService.createTaskQuery().processDefinitionKey(\"FlowableProcess\").taskOwner(\"maker\").processInstanceId(processId)      .singleResult();    if (task == null) {     return  response = \"There is no task available with processId :\" + processId;    }        \/\/ getting variable data which came from maker    Map&lt;String, Object> variables = taskService.getVariables(task.getId());          variables.put(\"complain\", complain.equals(\"\") ? variables.get(\"complain\") : complain);         taskService.setVariables(task.getId(), variables);    taskService.setVariable(task.getId(), \"makerApproved\", approve);    taskService.complete(task.getId());       response = \"Maker Successfully reviewed\";   } catch (Exception e) {    response = \"Error Occured While Maker Requesting :\" + e.getMessage();   }    return response;  }   public List&lt;TaskDetails> getTaskDetails(List&lt;Task> tasks) {    List&lt;TaskDetails> taskDetail = new ArrayList&lt;>();    for (Task task : tasks) {    Map&lt;String, Object> variables = new HashMap&lt;String, Object>();    Map&lt;String, Object> processVariable = taskService.getVariables(task.getId());    taskDetail.add(new TaskDetails(task.getId(), task.getName(), task.getCreateTime(), processVariable));    }    return taskDetail;  } }<\/code><\/pre>\n<h3>Entity \u043a\u043b\u0430\u0441\u0441<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c <code>FlowableRepo<\/code> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f CRUD-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"java\">package com.mediumBlog.Flowabledemo.entity;  import java.util.Date;  import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import lombok.Data;  @Entity @Data public class Complaint {   @Id  @GeneratedValue(strategy = GenerationType.IDENTITY)  private Long id;   private String complaint;  private String complaintInitiator;  private String complaintApprover;  private Date date;     }<\/code><\/pre>\n<h4>\u0414\u0435\u0442\u0430\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0438:<\/h4>\n<p>\u041a\u043b\u0430\u0441\u0441 &#171;TaskDetails&#187; \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u0438 \u0435\u0451 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041e\u043d \u0438\u043c\u0435\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u043e\u043b\u044f:<\/p>\n<ul>\n<li>\n<p>&#171;taskId&#187; \u0442\u0438\u043f\u0430 &#171;String&#187;: id \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>&#171;taskName&#187; \u0442\u0438\u043f\u0430 &#171;String&#187;: \u0438\u043c\u044f \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>&#171;updatedDate&#187; \u0442\u0438\u043f\u0430 &#171;Date&#187;, \u0434\u0430\u0442\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>&#171;taskData&#187; \u0442\u0438\u043f\u0430 &#171;Map&lt;String, Object>&#187;: \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u043f\u0430\u0440\u043e\u0439 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <code>FlowableServiceImpl<\/code> \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0437\u0430\u0434\u0430\u0447\u0435, \u0438, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434.<\/p>\n<pre><code class=\"java\">package com.mediumBlog.Flowabledemo.dao;  import java.util.Date; import java.util.Map; import lombok.Data;  @Data public class TaskDetails {     String taskId;      String taskName;      Date updatedDate;      public Map&lt;String, Object> taskData;       public TaskDetails(String taskId, String taskName, Date updatedDate, Map&lt;String, Object> taskData) {          super();          this.taskId = taskId;          this.taskName = taskName;          this.updatedDate = updatedDate;          this.taskData = taskData;      } }<\/code><\/pre>\n<h3>\u0422\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 Activiti<\/h3>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 Activiti \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0438 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f, \u0437\u0430\u043f\u0438\u0441\u0438 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u044b <strong>ACT_RU_TASK<\/strong> \u0438 <strong>ACT_RU_VARIABLE<\/strong> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 Activiti. \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <strong>ACT_RU_TASK<\/strong> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c, \u0441\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. <strong>ACT_RU_VARIABLE<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438, \u0438 \u043e\u0431\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u043a\u043b\u044e\u0447\u043e\u043c PROC_INST_ID_ \u0438 TASK_ID_.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 <strong>ACT_HI_TASKINST<\/strong> \u0438 <strong>ACT_HI_VARINST<\/strong>. ACT_HI_TASKINST \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f, \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 ACT_HI_VARINST \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0442\u0438\u043f\u044b. \u042d\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0443\u0434\u0438\u0442\u0430 \u0438 \u043e\u0442\u0447\u0451\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0445\u043e\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438 \u0443\u0437\u043d\u0430\u043b\u0438, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0435 \u0438 \u0433\u0438\u0431\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0438 BPM-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0432 Flowable \u0438 Spring Boot.<\/p>\n<p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430<a href=\"https:\/\/github.com\/hargundas\/flowable-springboot\"> <u>GitHub<\/u><\/a>.<\/p>\n<hr\/>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u043b\u044e\u0437\u044b \u043f\u0440\u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 BPMN? \u041e\u0431\u0441\u0443\u0434\u0438\u043c \u044d\u0442\u043e \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0443\u0440\u043e\u043a\u0435 15 \u0430\u043f\u0440\u0435\u043b\u044f. \u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/otus.pw\/uKZc\/\">\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0443\u0440\u0441\u0430.<\/a><\/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\/806357\/\"> https:\/\/habr.com\/ru\/articles\/806357\/<\/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>BPMN (<em>\u0430\u043d\u0433\u043b. Business Process Modeling Notation, \u00ab\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432\u00bb<\/em>) \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u044b. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u043e\u0440\u0446\u0438\u0443\u043c\u043e\u043c Object Management Group (OMG).<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0446\u0435\u043b\u044f\u043c\u0438 BPMN \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0437\u0430\u0442\u0440\u0430\u0442 \u0438 \u0441\u0440\u043e\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>Object Management Group \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0430 \u0440\u044f\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u0438 \u043d\u043e\u0442\u0430\u0446\u0438\u0439, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043a\u0430\u043a BPM (\u0430\u043d\u0433\u043b. \u201cBusiness Process Management\u201d, \u00ab\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438\u00bb).<\/p>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a Flowable \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u043c \u043e\u0442\u0440\u0430\u0441\u043b\u0435\u0432\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c BPMN 2.0. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 BPM \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u0438 \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<p>BPMN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\/\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0438\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f\u043c\u0438. \u041e\u043d \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0411\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u0430 Flowable<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435<\/strong> (Start Event) \u2014 \u043e\u0431\u044a\u0435\u043a\u0442 BPMN-\u043f\u043e\u0442\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p><strong>\u041f\u043e\u0442\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/strong> (Sequence Flow) \u2014 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e\u0442\u043e\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e\u0442\u043e\u043a\u0430. \u041e\u043d\u0438 \u0438\u0433\u0440\u0430\u044e\u0442 \u0440\u043e\u043b\u044c \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \u043f\u043e\u0442\u043e\u043a\u0430.<\/p>\n<p><strong>\u0428\u043b\u044e\u0437 \u00ab\u0418\u041b\u0418\/\u0418\u041b\u0418\u00bb<\/strong> (\u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439, Exclusive Gateway) \u2014 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u0439 \u0448\u043b\u044e\u0437<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 <\/strong>(User Task) \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Admin Maker \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p><strong>\u041a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 <\/strong>(End Event) \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 BPMN-\u043f\u043e\u0442\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043a\u0443 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Spring Boot, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0441 \u0434\u0432\u0438\u0436\u043a\u0430\u043c\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438 Flowable, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u044d\u0440\u043e\u043f\u043e\u0440\u0442\u043e\u043c \u0438\u043b\u0438 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435. \u0412 \u043d\u0451\u043c \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0432\u0430 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430: \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \/ maker (\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \/ checker (\u0442\u043e\u0442, \u043a\u0442\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441). \u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043a\u043e\u0434\u0430:<\/p>\n<p><strong>POM:<\/strong><\/p>\n<p>\u0424\u0430\u0439\u043b pom.xml, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 BPMN.<\/p>\n<pre><code class=\"xml\">&lt;dependency>    &lt;groupId>org.flowable&lt;\/groupId>    &lt;artifactId>flowable5-spring-compatibility&lt;\/artifactId>    &lt;version>${flowable.version}&lt;\/version> &lt;\/dependency><\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u043c \u0434\u0432\u0438\u0436\u043a\u0435 Flowable:<\/p>\n<ul>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;definations><\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;process><\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0430\u043c \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>&lt;userTask><\/code>, <code>&lt;serviceTask><\/code>, <code>&lt;sequenceFlow><\/code> \u0438 <code>&lt;exclusiveGateway><\/code>.<\/p>\n<\/li>\n<li>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 <code>&lt;startEvent><\/code> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>&lt;userTask><\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p><code>&lt;sequenceFlow><\/code> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<\/li>\n<li>\n<p><code>exclusiveGateway<\/code> \u2014 \u0442\u0438\u043f \u0448\u043b\u044e\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435. \u041e\u043d \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u0438\u043d \u0432\u0445\u043e\u0434 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0445\u043e\u0434\u043e\u0432, \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0438 \u0448\u043b\u044e\u0437 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 (true). \u0415\u0441\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u043c, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><code>endEvent<\/code> \u2014 \u044d\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0415\u0433\u043e \u0446\u0435\u043b\u044c \u2014 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0446 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>conditionExpression<\/code> \u2014 \u044d\u0442\u043e \u0431\u0443\u043b\u0435\u0432\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0438\u043c (exclusive) \u0448\u043b\u044e\u0437\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0440\u0430\u0437\u0432\u0435\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?> &lt;definitions  xmlns=\"http:\/\/www.omg.org\/spec\/BPMN\/20100524\/MODEL\"  xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"  xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\"  xmlns:activiti=\"http:\/\/activiti.org\/bpmn\"  xmlns:bpmndi=\"http:\/\/www.omg.org\/spec\/BPMN\/20100524\/DI\"  xmlns:omgdc=\"http:\/\/www.omg.org\/spec\/DD\/20100524\/DC\"  xmlns:omgdi=\"http:\/\/www.omg.org\/spec\/DD\/20100524\/DI\"  typeLanguage=\"http:\/\/www.w3.org\/2001\/XMLSchema\"  expressionLanguage=\"http:\/\/www.w3.org\/1999\/XPath\"  targetNamespace=\"http:\/\/www.activiti.org\/test\">  &lt;process id=\"FlowableProcess\" name=\"FlowableProcess\" isExecutable=\"true\">   &lt;startEvent id=\"startevent1\" name=\"Start\">&lt;\/startEvent>   &lt;userTask id=\"maker\" name=\"maker\" activiti:owner=\"maker\">&lt;\/userTask>   &lt;userTask id=\"checker\" name=\"checker\" activiti:owner=\"checker\">&lt;\/userTask>   &lt;sequenceFlow id=\"Flow_StartToMaker\"    sourceRef=\"startevent1\" targetRef=\"maker\">&lt;\/sequenceFlow>   &lt;exclusiveGateway id=\"MakerExclusivegateway\"    name=\"Exclusive Gateway Maer\">&lt;\/exclusiveGateway>   &lt;sequenceFlow id=\"Flow_MakerToGateway\" sourceRef=\"maker\"    targetRef=\"MakerExclusivegateway\">&lt;\/sequenceFlow>   &lt;sequenceFlow id=\"Flow_MakerGatewayToChecker\"    sourceRef=\"MakerExclusivegateway\" targetRef=\"checker\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${makerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>   &lt;exclusiveGateway id=\"CheckerExclusivegateway\"    name=\"Exclusive Gateway\">&lt;\/exclusiveGateway>   &lt;sequenceFlow id=\"Flow_CheckerToGateway\"    sourceRef=\"checker\" targetRef=\"CheckerExclusivegateway\">&lt;\/sequenceFlow>   &lt;endEvent id=\"endevent\" name=\"End\">&lt;\/endEvent>   &lt;sequenceFlow id=\"Flow_CheckerGatewayToEnd\"    sourceRef=\"CheckerExclusivegateway\" targetRef=\"endevent\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${checkerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>   &lt;sequenceFlow id=\"Flow_MakerGatewayToEnd\"    sourceRef=\"MakerExclusivegateway\" targetRef=\"endevent\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${!makerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>   &lt;sequenceFlow id=\"Flow_CheckerGatewayToMaker\"    sourceRef=\"CheckerExclusivegateway\" targetRef=\"maker\">    &lt;conditionExpression xsi:type=\"tFormalExpression\">&lt;![CDATA[${!checkerApproved}]]&gt;&lt;\/conditionExpression>   &lt;\/sequenceFlow>  &lt;\/process> &lt;\/definitions><\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c BPMN flowable \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043b\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0436\u0430\u043b\u043e\u0431.<\/p>\n<h3>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440:<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 5 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\n<p><code>@PostMapping(\"maker\/request\/{complain}\")<\/code><em> <\/em>\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI &#171;\/api\/maker\/request\/{complain}&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c <code>complain<\/code> \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0443\u0442\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0451 \u043c\u0435\u0442\u043e\u0434\u0443 <code>flowableService.makerRequest<\/code><em> <\/em>\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p><code>@GetMapping(\"checker\/pending\/tasks\")<\/code><em> <\/em>\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP GET-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI <em>&#171;<\/em>\/api\/checker\/pending\/tasks&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 checker-\u0430 \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>@PostMapping(\"\/checker\/review\/task\/{processId}\/{approve}\")<\/code> \u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 <em>URI <\/em>&#171;\/api\/checker\/review\/task\/{processId}\/{approve}&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0442 <code>processId<\/code> \u0438 <code>approve<\/code> \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0442\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0443 <code>flowableService.checkerReview<\/code> \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p><code>@GetMapping(\"maker\/return\/pending\/tasks\")<\/code> \u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP GET-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI &#171;\/api\/maker\/return\/pending\/tasks&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440\u0430 \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><code>@PostMapping(\"\/makerReview\/{complain}\/{processId}\/{approve}\")<\/code><em> <\/em>\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 HTTP POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 URI &#171;\/api\/makerReview\/{complain}\/{processId}\/{approve}&#187;. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0442 <code>complain<\/code>, <code>processId<\/code> \u0438 <code>approve<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0443\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0438\u0445 \u0432\u043e flowable-\u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 <code>flowableService<\/code> \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<pre><code class=\"java\">package com.mediumBlog.Flowabledemo.controller;  import java.util.HashMap; import java.util.Map; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.flowable.engine.ProcessEngine; import org.flowable.engine.RepositoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskService; import org.flowable.engine.repository.Deployment; import org.flowable.engine.runtime.ProcessInstance; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.mediumBlog.Flowabledemo.service.FlowableService;  @RestController @RequestMapping(\"\/api\/\") public class Controller {  @Autowired  private FlowableService flowableService;   \/*   * This api is to initiate a complain request and assign to checker   *\/  @PostMapping(\"maker\/request\/{complain}\")  public String makerRequest(@PathVariable(\"complain\") String complaint) {   String respons = flowableService.makerRequest(complaint);   return respons;  }   \/*   * This api is to get checker pending tasks which are assigned by maker   *\/  @GetMapping(\"checker\/pending\/tasks\")  public Map&lt;String, Object> checkerPending() {   Map&lt;String, Object> response = new HashMap&lt;String, Object>();   response =<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-373115","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373115","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=373115"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/373115\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=373115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=373115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=373115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}