{"id":359388,"date":"2024-05-21T00:31:38","date_gmt":"2024-05-21T00:31:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=359388"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T00:31:38","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=359388","title":{"rendered":"<span>\u041c\u0443\u0442\u0430\u0446\u0438\u0438 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445: \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c Temporal<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c50\/7fe\/39c\/c507fe39ca739ef47d273619083a3a5f.jpg\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c50\/7fe\/39c\/c507fe39ca739ef47d273619083a3a5f.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <br \/>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/770122\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043e \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0445 \u043c\u0443\u0442\u0430\u0446\u0438\u044f\u0445 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u0445 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u041f\u0440\u043e\u0444\u0438, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c workflow-engine <a href=\"https:\/\/temporal.io\/\" rel=\"noopener noreferrer nofollow\">Temporal<\/a>.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e Temporal<\/h2>\n<p>\u0412\u043f\u0435\u0440\u0432\u044b\u0435 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 Temporal \u0432 Technology Radar \u043e\u0442 ThoughtWorks, \u0433\u0434\u0435 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0446\u0438\u0442\u0430\u0442\u0430:<\/p>\n<blockquote>\n<p>Although we don\u2019t recommend using distributed transactions in microservice architectures, if you do need to implement them or long-running Sagas, you may want to look at Temporal. <a href=\"https:\/\/www.thoughtworks.com\/en-us\/radar\/platforms\/temporal\" rel=\"noopener noreferrer nofollow\">https:\/\/www.thoughtworks.com\/en-us\/radar\/platforms\/temporal<\/a><\/p>\n<\/blockquote>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e Temporal \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0435\u0449\u0451 <a href=\"https:\/\/github.com\/meirwah\/awesome-workflow-engines\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u0441\u044f\u0442\u043a\u0438 workflow engines<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u043d\u0438\u043c \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0437\u0432\u0451\u0437\u0434, \u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u0441\u044f. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/770122\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u0448\u0438\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c<\/a> \u0438 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f 2-3 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430, \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u2014 Temporal. \u0424\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0445\u043e\u0434\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 Go, TypeScript, PHP, Python \u0438 \u0442.\u043f. <\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u2014 Temporal \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0438\u0440\u0443\u0435\u0442. <\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044b. <\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c GUI, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438.  <\/p>\n<\/li>\n<li>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u043d\u0435\u043f\u043b\u043e\u0445\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f. <\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Temporal<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u0438 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 (\u0434\u0430\u043b\u0435\u0435 <em>workflow<\/em>). <\/p>\n<\/li>\n<li>\n<p>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 (\u0434\u0430\u043b\u0435\u0435 <em>activity<\/em>).<\/p>\n<\/li>\n<li>\n<p>Temporal-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a <em>workflow<\/em> \u0438 <em>activity<\/em><\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c\u0438 <em>workflow<\/em> \u0438 <em>activity<\/em> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443 \u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0432 \u0448\u0438\u0440\u043e\u043a\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0441 Temporal-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u2014 \u0437\u0430\u043f\u0443\u0441\u0442\u0438 \u0442\u0430\u043a\u043e\u0439-\u0442\u043e <em>workflow<\/em>. <\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/42e\/a7f\/a5f\/42ea7fa5fb31cee7a8141878fd9dccce.png\" width=\"1710\" height=\"1534\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/42e\/a7f\/a5f\/42ea7fa5fb31cee7a8141878fd9dccce.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/temporal.io\/how-temporal-works\" rel=\"noopener noreferrer nofollow\">\u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434<\/a> \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 dev-\u0433\u0430\u0439\u0434\u043e\u0432 <a href=\"https:\/\/docs.temporal.io\/dev-guide\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0447\u0442\u0438\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 Temporal php-sdk \u2014 <a href=\"https:\/\/habr.com\/ru\/companies\/oleg-bunin\/articles\/666154\/\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/habr.com\/ru\/companies\/oleg-bunin\/articles\/666158\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0432\u0430<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435<a href=\"https:\/\/docs.temporal.io\/concepts\/\" rel=\"noopener noreferrer nofollow\"> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e \u0432\u044b\u043d\u043e\u0441 \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430<\/h2>\n<p>\u041f\u0440\u043e\u0444\u0438 \u2014 \u044d\u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u0443\u0433\u0438 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<ul>\n<li>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0443\u0441\u043b\u0443\u0433\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442, \u0435\u0441\u043b\u0438 \u0437\u0430\u043a\u0430\u0437 \u0435\u043c\u0443 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u044f\u0432\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043f\u043b\u0430\u0442\u043d\u0430\u044f. <\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0437\u0430\u044f\u0432\u043a\u0438, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0443 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0442 \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0437\u0430\u043a\u0430\u0437\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u0438\u043b\u043b\u0438\u043d\u0433 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0431\u0449\u0443\u044e \u0446\u0430\u0440\u044c-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0434\u0435\u043d\u044c\u0433\u0438 \u0443\u043f\u043b\u0430\u0447\u0435\u043d\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0442.\u043f. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bc6\/e56\/1b5\/bc6e561b59cfa23e239d87669ba788fb.png\" width=\"1974\" height=\"1768\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bc6\/e56\/1b5\/bc6e561b59cfa23e239d87669ba788fb.png\"\/><\/figure>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0430\u0434\u0430\u0435\u0442 \u043c\u043e\u043d\u043e\u043b\u0438\u0442, \u0442\u043e \u043f\u0430\u0434\u0430\u0435\u0442 \u0438 \u0431\u0438\u043b\u043b\u0438\u043d\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u044f\u0432\u043a\u0438. <\/p>\n<\/li>\n<li>\n<p>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0411\u0414, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u0443\u044e \u043e\u0442\u0447\u0451\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0431\u0438\u0442\u0438\u0435 \u0447\u0435\u043a\u043e\u0432 \u043b\u0443\u0447\u0448\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \ud83d\ude42<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u0430\u0434\u0430\u0435\u0442 \u0411\u0414 \u0438\u043b\u0438 \u043c\u043e\u0440\u0433\u043d\u0443\u043b\u0430 \u0441\u0435\u0442\u044c, \u0442\u043e \u043c\u044b \u0442\u0435\u0440\u044f\u0435\u043c <s>\u043a\u043e\u0440\u043d\u0438<\/s> \u0437\u0430\u044f\u0432\u043a\u0438. \u0422\u0430\u043a\u043e\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u0440\u0435\u0434\u043a\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u043d\u043e \u043a\u0440\u0443\u0442\u043e \u0438\u043c\u0435\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043f\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u044f\u0432\u043a\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439. <\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0438\u0442\u043e\u0433\u0435: \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0430 \u0448\u0430\u0433\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0445 \u0441 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0439 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 MySQL \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/325\/1e5\/b64\/3251e5b64e4accb72affb398a17153a1.png\" width=\"1532\" height=\"1806\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/325\/1e5\/b64\/3251e5b64e4accb72affb398a17153a1.png\"\/><\/figure>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f<\/h2>\n<p>\u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e \u0442\u043e, \u0447\u0442\u043e Temporal \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c Temporal \u043a\u043b\u0430\u0441\u0442\u0435\u0440;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c Temporal-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f <em>workflow<\/em> \u0438 <em>activity<\/em>;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u043e\u0440\u043a\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <em>workflow<\/em> \u0438 <em>activity<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u043a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <em>workflow<\/em> \u0432 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/h3>\n<p>\u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/docs.temporal.io\/dev-guide\/typescript\/foundations#run-a-development-server\" rel=\"noopener noreferrer nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a> \u2014 \u043f\u0430\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 dev-\u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u0431\u0438\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c <code>temporal server start-dev --ip 0.0.0.0<\/code>  \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>\u0432\u0430\u0448_\u0445\u043e\u0441\u0442:8233<\/code> \u043e\u0442\u0434\u0430\u0451\u0442\u0441\u044f GUI:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a2b\/c6e\/de2\/a2bc6ede2884efcd1fe81dfa2aa79afc.png\" width=\"2194\" height=\"1100\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a2b\/c6e\/de2\/a2bc6ede2884efcd1fe81dfa2aa79afc.png\"\/><\/figure>\n<h3>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438 \u0441 \u0446\u0430\u0440\u044c-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439:<\/p>\n<pre><code class=\"php\">&lt;?php  class OrderApplier {    public function apply(     int $orderId,     string $specId,     OrderApplyParams $params,   ): int   {     if (!$this->applyValidator->couldBeApplied($orderId, $specId, $params)) {       throw new CouldNotApply();     }     $apply = null;     $chatTask = null;     $this->db->beginTransaction();     try {       $apply = $this->applyWriter->createApply($orderId, $specId, $params);        $this->ordersWriter->applyForOrder($orderId, $apply);               \/\/ \u0412\u043d\u0443\u0442\u0440\u0438 billApply \u2014 \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e INSERT-\u043e\u0432 \u0438 UPDATE-\u043e\u0432 \u0444\u0438\u043d-\u0442\u0430\u0431\u043b\u0438\u0446       $this->billing->billApply($apply);        \/\/ C\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0442\u0430\u0441\u043a\u0443 \u0432 outbox \u0442\u0430\u0431\u043b\u0438\u0446\u0443       $chatTask = $this->tasks->createTask(new CreateApplyChatTask($apply));        $this->db->commit();     } catch (Throwable $e) {       $this->db->rollBack();       throw $e;     }     \/\/ \u0412 \u043a\u043e\u043d\u0446\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0442\u0430\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u2014 \u043f\u043e\u0441\u0442-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433      \/\/ (\u0441\u0431\u0440\u043e\u0441 \u043a\u0435\u0448\u0435\u0439, \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0438 \u0442.\u043f.)     $this->tasks->queueTask($chatTask);     return $apply;   } } <\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c activities <\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c <em>activity<\/em> \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c Temporal-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0438 \u0431\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 PHP \u043a\u043b\u0430\u0441\u0441\u044b. <\/p>\n<h4>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 (\u0447\u0435\u0440\u0435\u0437 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430)<\/h4>\n<pre><code class=\"php\">&lt;?php  #[ActivityInterface] interface OrderApplyValidatorInterface {   public function couldBeApplied(     int $orderId,     string $specId,     OrderApplyParams $params   ): bool; }  class OrderApplyValidator implements OrderApplyValidatorInterface {     public function couldBeApplied(       int $orderId,       string $specId,       OrderApplyParams $params     ): bool {        ...       \/\/ \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438       ...       return true;     } } <\/code><\/pre>\n<h4>\u0417\u0430\u043f\u0438\u0441\u044c \u0437\u0430\u044f\u0432\u043a\u0438 \u0432 \u0431\u0430\u0437\u0443 (\u0431\u0435\u0437 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430)<\/h4>\n<pre><code class=\"php\">&lt;?php  class CreateApplyResult {   public ?Apply $apply;   public int $errorCode = 0; }  #[ActivityInterface] class OrderApplyCreator {   public function createApply(     int $orderId,     string $specId,     OrderApplyParams $params   ): CreateApplyResult {      $this->db->beginTransaction();     try {       $apply = $this->applyWriter->createApply($orderId, $specId, $params);        $this->ordersWriter->applyForOrder($orderId, $apply);        $this->db->commit();       return new CreateApplyResult($apply);     } catch (Throwable $e) {       $this->db->rollBack();       return new CreateApplyResult(null, $e->getCode());     }   } } <\/code><\/pre>\n<h4>\u0411\u0438\u043b\u043b\u0438\u043d\u0433<\/h4>\n<pre><code class=\"php\">&lt;?php  class BillApplyResult {   public int $errorCode = 0; }  #[ActivityInterface] interface OrderApplyBillerInterface {   public function billApply(Apply $apply): BillApplyResult; }  class OrderApplyBiller implements OrderApplyBillerInterface {     public function billApply(Apply $apply): BillApplyResult {        ...       \/\/ \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430       ...       return new BillApplyResult(...);     } } <\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0447\u0430\u0442\u0430<\/h4>\n<pre><code class=\"php\">&lt;?php  #[ActivityInterface] interface OrderApplyChatCreatorInterface {   public function createChat(Apply $apply): void; }  class OrderApplyChatCreator implements OrderApplyChatCreatorInterface {   public function createChat(Apply $apply): void {      ...     \/\/ \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u0442\u0430     ...   } }<\/code><\/pre>\n<p>\u041d\u0443 \u0432 \u043e\u0431\u0449\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u2014 \u043f\u043e\u0441\u0442\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438. <\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014 \u0432\u0441\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u043c\u0438, \u043b\u0438\u0431\u043e \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<a href=\"https:\/\/github.com\/temporalio\/sdk-php\/blob\/master\/src\/DataConverter\/DataConverterInterface.php\" rel=\"noopener noreferrer nofollow\"> Data Converter<\/a>. <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c workflow<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <em>activity<\/em>, \u0434\u043b\u044f workflow \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c Temporal-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u2014 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0430\u043a \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043a\u0430\u0445:<\/p>\n<pre><code class=\"php\">&lt;?php  class ApplyForOrderResult {   public ?Apply $apply;   public int $errorCode = 0; }  #[WorkflowInterface] interface ApplyForOrderWorkflowInterface {   #[WorkflowMethod(\"applyForOrder\")]   #[ReturnType(ApplyForOrderResult::class)]   public function applyForOrder(     int $orderId,     string $specId,     OrderApplyParams $params   ); } <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2014 \u0432 \u043d\u0451\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430\u0448\u0435\u0439 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"php\">&lt;?php  class ApplyForOrderWorkflow implements ApplyForOrderWorkflowInterface {   public function __construct()   {     \/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c activity-\u0441\u0442\u0430\u0431\u044b (RPC) \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 activity-\u043c\u0435\u0442\u043e\u0434\u043e\u0432     $this->validator = Workflow::newActivityStub(       OrderApplyValidatorInterface::class,       ActivityOptions::new()->withStartToCloseTimeout(         \\DateInterval::createFromDateString('3 seconds')       )     );      $this->creator = Workflow::newActivityStub(       OrderApplyCreator::class,       \/\/...     );      \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c activity-\u0441\u0442\u0430\u0431 \u0434\u043b\u044f activity,     \/\/ \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0438\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0442\u0435\u043a\u0435     $this->biller = Workflow::newUntypedActivityStub(       ActivityOptions::new()->withStartToCloseTimeout(         \\DateInterval::createFromDateString('5 seconds')       )     );      $this->chat = Workflow::newActivityStub(       OrderApplyChatCreatorInterface::class,       \/\/...     );   }    public function applyForOrder(     int $orderId,     string $specId,     OrderApplyParams $params   )   {     $couldBeApplied = yield $this->validator->couldBeApplied(       $orderId, $specId, $params     );     if (!$couldBeApplied) {       return new ApplyForOrderResult(null, 1);     }      $createResult = yield $this->creator->createApply(       $orderId, $specId, $params     );     if ($createResult->errorCode != 0) {       return new ApplyForOrderResult(null, $createResult->error_code);     }      \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c activity \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u2014 \u043f\u043e \u0438\u043c\u0435\u043d\u0438.     $billingResult = yield $this->biller->execute(       'billApply',        [$createResult->apply],        BillApplyResult::class \/\/ \u041c\u0430\u043f\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441     );     if ($billingResult->errorCode != 0) {       \/\/        \/\/ @todo \u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u0442\u043a\u0430\u0442\u0430 \u0437\u0430\u044f\u0432\u043a\u0438 \u0442.\u043a. \u0431\u0438\u043b\u043b\u0438\u043d\u0433 \u043d\u0435 \u043f\u0440\u043e\u0448\u0451\u043b       \/\/       return new ApplyForOrderResult(null, $billingResult->error_code);      }      yield $this->chat->createChat($createResult->apply);      return new ApplyForOrderResult($createResult->apply);   } }<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 <em>activity<\/em>-\u0441\u0442\u0430\u0431\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u2014 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u044b, \u0440\u0435\u0439\u0442-\u043b\u0438\u043c\u0438\u0442\u044b \u0438 \u0442.\u043f. <\/p>\n<\/li>\n<li>\n<p><em>Activity<\/em> \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>$foo = yield bar()<\/code> \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044e <code>await<\/code> \u0432 TypeScript \u0438\u043b\u0438 Python. \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u043e <a href=\"https:\/\/gist.github.com\/em1nx\/d46f2fc11723a848ae167afa5ee062ce\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c<\/a> \u043f\u0440\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0443 \u044d\u0442\u043e\u0439 \u043d\u0435\u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u0434\u043b\u044f PHP \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u043e\u0440\u043a\u0435\u0440<\/h3>\n<p>Temporal \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/roadrunner.dev\/\" rel=\"noopener noreferrer nofollow\">RoadRunner<\/a> \u2014 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c PHP-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0434\u043e\u043b\u0433\u043e\u0436\u0438\u0432\u0443\u0449\u0435\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c RoadRunner<\/h4>\n<pre><code class=\"yaml\">temporal:   address: ${\u0445\u043e\u0441\u0442_\u043f\u043e\u0440\u0442_temporal_\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430}   activities:     num_workers: 8    rpc:   enable: true   listen: tcp:\/\/127.0.0.1:6001  server:   command: \"php worker.php\"<\/code><\/pre>\n<h4>\u041f\u0438\u0448\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u043e\u0440\u043a\u0435\u0440\u0430<\/h4>\n<pre><code class=\"php\">&lt;?php  ...  $container = Container::getInstance(); $factory = WorkerFactory::create(); $worker = $factory->newWorker();  \/\/ \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u043a\u0438\u0435 workflow \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u043e\u0440\u043a\u0435\u0440 $worker->registerWorkflowTypes(     ApplyForOrderWorkflow::class     );  \/\/ \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c activity  $worker->registerActivity(     OrderApplyValidator::class,     fn(ReflectionClass $class) => $container->get($class->getName()) );  ...   $worker->registerActivity(     OrderApplyChatCreator::class,     fn(ReflectionClass $class) => $container->get($class->getName()) );  $factory->run();<\/code><\/pre>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u043c \u0432\u043e\u0440\u043a\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 RoadRunner \u0438 \u0441\u043b\u0443\u0448\u0430\u0435\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bef\/62e\/e21\/bef62ee21195c087ef0b986690abe04d.png\" width=\"1716\" height=\"450\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bef\/62e\/e21\/bef62ee21195c087ef0b986690abe04d.png\"\/><\/figure>\n<h4>\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0437\u0430 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u043c\u0438<\/h4>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/310\/3e6\/e3d\/3103e6e3db87372a7ac5bc148f9b2305.png\" width=\"1208\" height=\"512\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/310\/3e6\/e3d\/3103e6e3db87372a7ac5bc148f9b2305.png\"\/><\/figure>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c workflow<\/h3>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a <em>workflow<\/em> \u0432 \u0431\u0438\u0437\u043d\u0435\u0441 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.  <em>Workflow<\/em> \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u0439\u0434\u0451\u043c \u043f\u043e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0442.\u043a. \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432 \u043a \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0437\u0430\u044f\u0432\u043a\u0438, \u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, 99% <em>workflow<\/em>, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0442.\u043a. \u043f\u043e\u0432\u0442\u043e\u0440\u044b, \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0432\u043e\u0442 \u044d\u0442\u043e \u0432\u043e\u0442 \u0432\u0441\u0451. <\/p>\n<p>\u041a\u043e\u0434 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <em>workflow<\/em> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a: <\/p>\n<pre><code class=\"php\">&lt;?php ... $result = $this->apply_workflow->applyForOrder(   $orderId,   $specId,   $params ); ...<\/code><\/pre>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u044f\u0432\u043a\u0438<\/h3>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430 \u0441 \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u043c, \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e\u0434 \u043d\u0438\u043c \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0431\u0435\u043a\u043e\u0444\u0438\u0441 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u044f\u0432\u043a\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bf8\/7fa\/da0\/bf87fada04acbed5bb60002a873b22b6.png\" width=\"3080\" height=\"1732\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bf8\/7fa\/da0\/bf87fada04acbed5bb60002a873b22b6.png\"\/><\/figure>\n<p>\u0417\u0430\u044f\u0432\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430, \u0434\u0435\u043d\u044c\u0433\u0438 \u0441\u043f\u0438\u0441\u0430\u043d\u044b, \u0447\u0430\u0442 \u0441\u043e\u0437\u0434\u0430\u043d: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e40\/708\/ae9\/e40708ae9918402bce138c53c5e48423.png\" width=\"2386\" height=\"1754\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e40\/708\/ae9\/e40708ae9918402bce138c53c5e48423.png\"\/><\/figure>\n<p>\u0418\u0434\u0451\u043c \u0432 GUI Temporal \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043b\u043e\u0433\u0438 \u043d\u0430\u0448\u0435\u0433\u043e workflow:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a84\/1dc\/77f\/a841dc77fef04f5937133dc3ae01e69a.png\" width=\"2618\" height=\"1544\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a84\/1dc\/77f\/a841dc77fef04f5937133dc3ae01e69a.png\"\/><\/figure>\n<h3>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0430\u0434\u0435\u043d\u0438\u0439<\/h3>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u043c \u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0438 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 <em>workflow<\/em> \u043d\u0435 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b:<\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435 <em>activity<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0440\u043a\u0435\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 <em>workflow<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 MySQL has gone away \u0442.\u043a. \u043a\u043e\u0434 \u043d\u0435 \u0431\u044b\u043b \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u043b\u0435\u043d \u043a \u0434\u043e\u043b\u0433\u043e\u0438\u0433\u0440\u0430\u044e\u0449\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c. <\/p>\n<\/li>\n<li>\n<p>\u0438 \u0442.\u043f. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043a\u0435\u0439\u0441\u044b Temporal \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0434\u0430\u0436\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0441 \u043d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0430 \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 GUI:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a99\/440\/582\/a99440582d6613f3dab98079f68a17fc.png\" width=\"2464\" height=\"1266\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a99\/440\/582\/a99440582d6613f3dab98079f68a17fc.png\"\/><\/figure>\n<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b, \u043f\u043e\u0440\u0430 \u043f\u043e\u0434\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0442\u043e\u0433\u0438. <\/p>\n<h2>\u041f\u043b\u044e\u0441\u044b Temporal<\/h2>\n<h3>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h3>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u043d\u0430\u0448 \u0441\u0442\u0435\u043a \u2014 PHP, TypeScript \u0438 Python. <\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0448\u0430\u0442\u044c \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 \u0437\u0430\u0434\u0430\u0447: \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0435 \u043c\u0443\u0442\u0430\u0446\u0438\u0438, \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u044f, \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438, \u043a\u0440\u043e\u043d\u044b, \u0444\u043b\u043e\u0443 \u0431\u0438\u0437\u043d\u0435\u0441-\u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u0442.\u043f. \u2014 \u0432\u0441\u0451 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 Temporal. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0437\u0440\u044b\u0432\u0430\u0435\u0442 \u043c\u043e\u0437\u0433 <a href=\"https:\/\/github.com\/temporalio\/samples-php\/blob\/master\/app\/src\/Subscription\/SubscriptionWorkflow.php\" rel=\"noopener noreferrer nofollow\">workflow \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0443\u0449\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441 \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0432 activity \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432 workflow. \u041f\u0440\u0430\u0432\u0434\u0430 \u0443 \u043a\u043e\u0434\u0430 \u0441\u0430\u043c\u043e\u0433\u043e workflow <a href=\"https:\/\/docs.temporal.io\/dev-guide\/php\/foundations#workflow-logic-requirements\" rel=\"noopener noreferrer nofollow\">\u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/a>, \u043d\u043e \u0432 activity \u043c\u043e\u0436\u043d\u043e \u0442\u0432\u043e\u0440\u0438\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. <\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0443\u0442\u044c \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 ML-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0432 \u043d\u0430\u0448\u0438 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0432 GUI \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0437 activity \u0438 \u0438\u0433\u0440\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0432 \u0410\/\u0411 \u0442\u0435\u0441\u0442\u044b. <\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c<\/h3>\n<ul>\n<li>\n<p>Temporal \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0432 Uber, \u0442\u0430\u043a\u0436\u0435 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0431\u0438\u0433\u0442\u0435\u0445\u0438 \u043a\u0430\u043a Snap \u0438 Netflix \u2014 \u044d\u0442\u043e \u0432\u043d\u0443\u0448\u0430\u0435\u0442 \u0434\u043e\u0432\u0435\u0440\u0438\u0435. <\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 workflow \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b, \u0442\u043e Temporal \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0435\u0433\u043e \u0434\u043e \u043a\u043e\u043d\u0446\u0430 c \u0443\u0447\u0451\u0442\u043e\u043c <a href=\"https:\/\/docs.temporal.io\/retry-policies\" rel=\"noopener noreferrer nofollow\">retry policy<\/a>. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443\u043f\u0430\u043b\u0438 \u0432\u043e\u0440\u043a\u0435\u0440\u044b, \u043e\u0442\u0432\u0430\u043b\u0438\u043b\u0438\u0441\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u2014 workflow \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d. <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f activity \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c rate limits \u0438 retry policy.  <\/p>\n<\/li>\n<li>\n<p>\u041e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 workflow \u0438 \u0442\u0443\u0442 \u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0442\u043a\u0430\u0442-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.  <\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0430\u0437\u043d\u044b\u0435 \u043f\u043b\u044e\u0448\u043a\u0438<\/h3>\n<ul>\n<li>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0439 GUI, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 workflow. <\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0438 \u0434\u043b\u044f workflow \u0438 activity. <\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0432 Temporal. <\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e <a href=\"https:\/\/docs.temporal.io\/workflows#signal\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b<\/a> \u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 workflow. <\/p>\n<\/li>\n<li>\n<p>Temporal <a href=\"https:\/\/docs.temporal.io\/workflows#run-id\" rel=\"noopener noreferrer nofollow\">\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 workflow<\/a> \u0441 \u0434\u0430\u043d\u043d\u044b\u043c id \u2014 \u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 race conditions. <\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.temporal.io\/\" rel=\"noopener noreferrer nofollow\">\u041d\u0435\u043f\u043b\u043e\u0445\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a>, \u0435\u0441\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. <\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.temporal.io\/dev-guide\/php\/testing\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 namespace-\u043e\u0432. <\/p>\n<\/li>\n<\/ul>\n<h2>\u041c\u0438\u043d\u0443\u0441\u044b Temporal<\/h2>\n<h3>\u0420\u0438\u0441\u043a \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0430<\/h3>\n<ul>\n<li>\n<p>\u0425\u043e\u0442\u044c \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 RPC \u0432\u044b\u0437\u043e\u0432\u044b \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d Temporal \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u043d\u043e \u0433\u0438\u0431\u043a\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u044b\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u043a\u0442\u043e \u0438 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442, \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a, \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0434\u0451\u0440\u0433\u0430\u0442\u044c \u0434\u0440\u0443\u0433-\u0434\u0440\u0443\u0433\u0430. <\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u044b\u0441\u043e\u043a\u0438\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430<\/h3>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u0435\u043d \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433 \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u2014 \u0435\u0434\u0432\u0430 \u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0445\u043e\u0434\u0443 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u201c\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u201d \u043d\u0430 Temporal.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Temporal \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0442\u043e devops-\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u043d\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0432 production, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043c\u0435\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0447\u0438\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. <\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0430\u0437\u043d\u044b\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0438<\/h3>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0437\u043e\u043e\u043f\u0430\u0440\u043a\u043e\u043c \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 \u2014 \u0437\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c, \u0437\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u0434\u0430 \u0438 \u0442.\u043f. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u043a\u0430\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. <\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0434 workflow \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c <a href=\"https:\/\/docs.temporal.io\/workflows#deterministic-constraints\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <a href=\"https:\/\/docs.temporal.io\/workers#worker-versioning\" rel=\"noopener noreferrer nofollow\">\u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f workflow \u0438 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 workflow \u0438 activity \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 <a href=\"https:\/\/docs.temporal.io\/dev-guide\/php\/foundations#activity-parameters\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f<\/a>.<\/p>\n<\/li>\n<li>\n<p>99% workflow \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u2014 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. <\/p>\n<\/li>\n<li>\n<p>\u041e\u0432\u0435\u0440\u0445\u0435\u0434 \u043d\u0430 \u043a\u043e\u0434 \u2014 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430, \u043d\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0430 copilot-\u0430 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0443\u0436 \u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. <\/p>\n<\/li>\n<\/ul>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>\u041d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 Temporal \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u0435\u0442 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c\u044e. \u041e\u0434\u043d\u0430\u043a\u043e, \u0431\u0435\u0437 \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u043c\u043e\u043d\u043e\u043b\u0438\u0442 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u044b\u0442\u0435\u043a\u0430\u044e\u0449\u0438\u043c\u0438. <\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u2014 \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0447\u0435\u043c\u0443-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u043c\u0443. \u0415\u0441\u043b\u0438 \u0432 \u043c\u044b \u0438\u0442\u043e\u0433\u0435 \u0437\u0430\u044e\u0437\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0442\u043e \u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0448\u0443 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043f\u044b\u0442\u0435 \u0432 \u043f\u0440\u043e\u0434\u0435. <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0447\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438!<br \/>\u041f\u043e\u043a\u0430 \ud83d\ude42<\/p>\n<p>P.S. \u0415\u0441\u043b\u0438 \u0441\u0440\u0435\u0434\u0438 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0435, \u043a\u0442\u043e \u0443\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 Temporal, \u0442\u043e \u0431\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0437\u0430 \u043a\u0435\u0439\u0441\u044b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. <\/p>\n<h2>\u0421\u0442\u0430\u0442\u044c\u0438 \u0438\u0437 \u0441\u0435\u0440\u0438\u0438<\/h2>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0437\u0430\u0434\u0430\u0447\u0438: <a href=\"https:\/\/habr.com\/ru\/articles\/770122\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/770122\/<\/a><br \/>\u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e Temporal: \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f<br \/>\u0422\u0440\u0435\u0442\u044c\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e TSQM: <a href=\"https:\/\/habr.com\/ru\/articles\/776794\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/articles\/776794\/<\/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\/772084\/\"> https:\/\/habr.com\/ru\/articles\/772084\/<\/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<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <br \/>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/770122\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043e \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0445 \u043c\u0443\u0442\u0430\u0446\u0438\u044f\u0445 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u0445 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u041f\u0440\u043e\u0444\u0438, \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c workflow-engine <a href=\"https:\/\/temporal.io\/\" rel=\"noopener noreferrer nofollow\">Temporal<\/a>.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e Temporal<\/h2>\n<p>\u0412\u043f\u0435\u0440\u0432\u044b\u0435 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 Temporal \u0432 Technology Radar \u043e\u0442 ThoughtWorks, \u0433\u0434\u0435 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0446\u0438\u0442\u0430\u0442\u0430:<\/p>\n<blockquote>\n<p>Although we don\u2019t recommend using distributed transactions in microservice architectures, if you do need to implement them or long-running Sagas, you may want to look at Temporal. <a href=\"https:\/\/www.thoughtworks.com\/en-us\/radar\/platforms\/temporal\" rel=\"noopener noreferrer nofollow\">https:\/\/www.thoughtworks.com\/en-us\/radar\/platforms\/temporal<\/a><\/p>\n<\/blockquote>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e Temporal \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0435\u0449\u0451 <a href=\"https:\/\/github.com\/meirwah\/awesome-workflow-engines\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u0441\u044f\u0442\u043a\u0438 workflow engines<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u043d\u0438\u043c \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0437\u0432\u0451\u0437\u0434, \u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u0441\u044f. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/770122\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u0448\u0438\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c<\/a> \u0438 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f 2-3 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430, \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u2014 Temporal. \u0424\u0438\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0445\u043e\u0434\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0438 \u043c\u0443\u0442\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 Go, TypeScript, PHP, Python \u0438 \u0442.\u043f. <\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u2014 Temporal \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0438\u0440\u0443\u0435\u0442. <\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044b. <\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u0442\u044c GUI, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438.  <\/p>\n<\/li>\n<li>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u043d\u0435\u043f\u043b\u043e\u0445\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f. <\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Temporal<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u0438 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u043e \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 (\u0434\u0430\u043b\u0435\u0435 <em>workflow<\/em>). <\/p>\n<\/li>\n<li>\n<p>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 (\u0434\u0430\u043b\u0435\u0435 <em>activity<\/em>).<\/p>\n<\/li>\n<li>\n<p>Temporal-\u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a <em>workflow<\/em> \u0438 <em>activity<\/em><\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c\u0438 <em>workflow<\/em> \u0438 <em>activity<\/em> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443 \u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0432 \u0448\u0438\u0440\u043e\u043a\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0441 Temporal-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u2014 \u0437\u0430\u043f\u0443\u0441\u0442\u0438 \u0442\u0430\u043a\u043e\u0439-\u0442\u043e <em>workflow<\/em>. <\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/temporal.io\/how-temporal-works\" rel=\"noopener noreferrer nofollow\">\u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0430\u0439\u0434<\/a> \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 dev-\u0433\u0430\u0439\u0434\u043e\u0432 <a href=\"https:\/\/docs.temporal.io\/dev-guide\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0447\u0442\u0438\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043e\u0442 \u0430\u0432\u0442\u043e\u0440\u043e\u0432 Temporal php-sdk \u2014 <a href=\"https:\/\/habr.com\/ru\/companies\/oleg-bunin\/articles\/666154\/\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437<\/a>, <a href=\"https:\/\/habr.com\/ru\/companies\/oleg-bunin\/articles\/666158\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0432\u0430<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435<a href=\"https:\/\/docs.temporal.io\/concepts\/\" rel=\"noopener noreferrer nofollow\"> \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439<\/a>.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e \u0432\u044b\u043d\u043e\u0441 \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430<\/h2>\n<p>\u041f\u0440\u043e\u0444\u0438 \u2014 \u044d\u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u0443\u0433\u0438 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<ul>\n<li>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043a\u0430\u0437 \u043d\u0430 \u0443\u0441\u043b\u0443\u0433\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442, \u0435\u0441\u043b\u0438 \u0437\u0430\u043a\u0430\u0437 \u0435\u043c\u0443 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u044f\u0432\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u043f\u043b\u0430\u0442\u043d\u0430\u044f. <\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0437\u0430\u044f\u0432\u043a\u0438, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0443 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0442 \u0441 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438 \u0437\u0430\u043a\u0430\u0437\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u0438\u043b\u043b\u0438\u043d\u0433 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0431\u0449\u0443\u044e \u0446\u0430\u0440\u044c-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0434\u0435\u043d\u044c\u0433\u0438 \u0443\u043f\u043b\u0430\u0447\u0435\u043d\u044b, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0438 \u0442.\u043f. <\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0430\u0434\u0430\u0435\u0442 \u043c\u043e\u043d\u043e\u043b\u0438\u0442, \u0442\u043e \u043f\u0430\u0434\u0430\u0435\u0442 \u0438 \u0431\u0438\u043b\u043b\u0438\u043d\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u044f\u0432\u043a\u0438. <\/p>\n<\/li>\n<li>\n<p>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0411\u0414, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0435 \u043d\u0430 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u0443\u044e \u043e\u0442\u0447\u0451\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0431\u0438\u0442\u0438\u0435 \u0447\u0435\u043a\u043e\u0432 \u043b\u0443\u0447\u0448\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \ud83d\ude42<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u0430\u0434\u0430\u0435\u0442 \u0411\u0414 \u0438\u043b\u0438 \u043c\u043e\u0440\u0433\u043d\u0443\u043b\u0430 \u0441\u0435\u0442\u044c, \u0442\u043e \u043c\u044b \u0442\u0435\u0440\u044f\u0435\u043c <s>\u043a\u043e\u0440\u043d\u0438<\/s> \u0437\u0430\u044f\u0432\u043a\u0438. \u0422\u0430\u043a\u043e\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u0440\u0435\u0434\u043a\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439, \u043d\u043e \u043a\u0440\u0443\u0442\u043e \u0438\u043c\u0435\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043f\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u044f\u0432\u043a\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439. <\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u0438\u0442\u043e\u0433\u0435: \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0430 \u0448\u0430\u0433\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0445 \u0441 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e\u0439 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 MySQL \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u043c\u0438. <\/p>\n<figure class=\"full-width\"><\/figure>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f<\/h2>\n<p>\u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e \u0442\u043e, \u0447\u0442\u043e Temporal \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c Temporal \u043a\u043b\u0430\u0441\u0442\u0435\u0440;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c Temporal-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f <em>workflow<\/em> \u0438 <em>activity<\/em>;<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u043e\u0440\u043a\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <em>workflow<\/em> \u0438 <em>activity<\/em>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u043a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 <em>workflow<\/em> \u0432 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/h3>\n<p>\u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/docs.temporal.io\/dev-guide\/typescript\/foundations#run-a-development-server\" rel=\"noopener noreferrer nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a> \u2014 \u043f\u0430\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 dev-\u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u0431\u0438\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c <code>temporal server start-dev --ip 0.0.0.0<\/code>  \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <code>\u0432\u0430\u0448_\u0445\u043e\u0441\u0442:8233<\/code> \u043e\u0442\u0434\u0430\u0451\u0442\u0441\u044f GUI:<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0421\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438 \u0441 \u0446\u0430\u0440\u044c-\u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0435\u0439:<\/p>\n<pre><code class=\"php\">&lt;?php  class OrderApplier {    public function apply(     int $orderId,     string $specId,     OrderApplyParams $params,   ): int   {     if (!$this->applyValidator->couldBeApplied($orderId, $specId, $params)) {       throw new CouldNotApply();     }     $apply = null;     $chatTask = null;     $this->db->beginTransaction();     try {       $apply = $this->applyWriter->createApply($orderId, $specId, $params);        $this->ordersWriter->applyForOrder($orderId, $apply);               \/\/ \u0412\u043d\u0443\u0442\u0440\u0438 billApply \u2014 \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e INSERT-\u043e\u0432 \u0438 UPDATE-\u043e\u0432 \u0444\u0438\u043d-\u0442\u0430\u0431\u043b\u0438\u0446       $this->billing->billApply($apply);        \/\/ C\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0442\u0430\u0441\u043a\u0443 \u0432 outbox \u0442\u0430\u0431\u043b\u0438\u0446\u0443       $chatTask = $this->tasks->createTask(new CreateApplyChatTask($apply));        $this->db->commit();     } catch (Throwable $e) {       $this->db->rollBack();       throw $e;     }     \/\/ \u0412 \u043a\u043e\u043d\u0446\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0442\u0430\u0441\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u2014 \u043f\u043e\u0441\u0442-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433      \/\/ (\u0441\u0431\u0440\u043e\u0441 \u043a\u0435\u0448\u0435\u0439, \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0438 \u0442.\u043f.)     $this->tasks->queueTask($chatTask);     return $apply;   } } <\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c activities <\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c <em>activity<\/em> \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c Temporal-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0438 \u0431\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 PHP \u043a\u043b\u0430\u0441\u0441\u044b. <\/p>\n<h4>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 (\u0447\u0435\u0440\u0435\u0437 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430)<\/h4>\n<pre><code class=\"php\">&lt;?php  #[ActivityInterface] interface OrderApplyValidatorInterface {   public function couldBeApplied(     int $orderId,     string $specId,     OrderApplyParams $params   ): bool; }  class OrderApplyValidator implements OrderApplyValidatorInterface {     public function couldBeApplied(       int $orderId,       string $specId,       OrderApplyParams $params     ): bool {        ...       \/\/ \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438       ...       return true;     } } <\/code><\/pre>\n<h4>\u0417\u0430\u043f\u0438\u0441\u044c \u0437\u0430\u044f\u0432\u043a\u0438 \u0432 \u0431\u0430\u0437\u0443 (\u0431\u0435\u0437 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430)<\/h4>\n<pre><code class=\"php\">&lt;?php  class CreateApplyResult {   public ?Apply $apply;   public int $errorCode = 0; }  #[ActivityInterface] class OrderApplyCreator {   public function createApply(     int $orderId,     string $specId,     OrderApplyParams $params   ): CreateApplyResult {      $this->db->beginTransaction();     try {       $apply = $this->applyWriter->createApply($orderId, $specId, $params);        $this->ordersWriter->applyForOrder($orderId, $apply);        $this->db->commit();       return new CreateApplyResult($apply);     } catch (Throwable $e) {       $this->db->rollBack();       return new CreateApplyResult(null, $e->getCode());     }   } } <\/code><\/pre>\n<h4>\u0411\u0438\u043b\u043b\u0438\u043d\u0433<\/h4>\n<pre><code class=\"php\">&lt;?php  class BillApplyResult {   public int $errorCode = 0; }  #[ActivityInterface] interface OrderApplyBillerInterface {   public function billApply(Apply $apply): BillApplyResult; }  class OrderApplyBiller implements OrderApplyBillerInterface {     public function billApply(Apply $apply): BillApplyResult {        ...       \/\/ \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430       ...       return new BillApplyResult(...);     } } <\/code><\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0447\u0430\u0442\u0430<\/h4>\n<pre><code class=\"php\">&lt;?php  #[ActivityInterface] interface OrderApplyChatCreatorInterface {   public function createChat(Apply $apply): void; }  class OrderApplyChatCreator implements OrderApplyChatCreatorInterface {   public function createChat(Apply $apply): void {      ...     \/\/ \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u0442\u0430     ...   } }<\/code><\/pre>\n<p>\u041d\u0443 \u0432 \u043e\u0431\u0449\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u2014 \u043f\u043e\u0441\u0442\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438. <\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2014 \u0432\u0441\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u043c\u0438, \u043b\u0438\u0431\u043e \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<a href=\"https:\/\/github.com\/temporalio\/sdk-php\/blob\/master\/src\/DataConverter\/DataConverterInterface.php\" rel=\"noopener noreferrer nofollow\"> Data Converter<\/a>. <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c workflow<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <em>activity<\/em>, \u0434\u043b\u044f workflow \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c Temporal-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u2014 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0430\u043a \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043a\u0430\u0445:<\/p>\n<pre><code class=\"php\">&lt;?php  class ApplyForOrderResult {   public ?Apply $apply;   public int $errorCode = 0; }  #[WorkflowInterface] interface ApplyForOrderWorkflowInterface {   #[WorkflowMethod(\"applyForOrder\")]   #[ReturnType(ApplyForOrderResult::class)]   public function applyForOrder(     int $orderId,     string $specId,     OrderApplyParams $params   ); } <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2014 \u0432 \u043d\u0451\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430\u0448\u0435\u0439 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"php\">&lt;?php  class ApplyForOrderWorkflow implements ApplyForOrderWorkflowInterface {   public function __construct()   {     \/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c activity-\u0441\u0442\u0430\u0431\u044b (RPC) \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 activity-\u043c\u0435\u0442\u043e\u0434\u043e\u0432     $this->validator = Workflow::newActivityStub(       OrderApplyValidatorInterface::class,       ActivityOptions::new()->withStartToCloseTimeout(         \\DateInterval::createFromDateString('3 seconds')       )     );      $this->creator = Workflow::newActivityStub(       OrderApplyCreator::class,       \/\/...     );      \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c activity-\u0441\u0442\u0430\u0431 \u0434\u043b\u044f activity,     \/\/ \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0438\u043b\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0442\u0435\u043a\u0435     $this->biller = Workflow::newUntypedActivityStub(       ActivityOptions::new()->withStartToCloseTimeout(         \\DateInterval::createFromDateString('5 seconds')       )     );      $this->chat = Workflow::newActivityStub(       OrderApplyChatCreatorInterface::class,       \/\/...     );   }    public function applyForOrder(     int $orderId,     string $specId,     OrderApplyParams $params   )   {     $couldBeApplied = yield $this->validator->couldBeApplied(       $orderId, $specId, $params     );     if (!$couldBeApplied) {       return new ApplyForOrderResult(null, 1);     }      $createResult = yield $this->creator->createApply(       $orderId, $specId, $params     );     if ($createResult->errorCode != 0) {       return new ApplyForOrderResult(null, $createResult->error_code);     }      \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c activity \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u2014 \u043f\u043e \u0438\u043c\u0435\u043d\u0438.     $billingResult = yield $this->biller->execute(       'billApply',        [$createResult->apply],        BillApplyResult::class \/\/ \u041c\u0430\u043f\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043b\u0430\u0441\u0441     );     if ($billingResult->errorCode != 0) {       \/\/        \/\/ @todo \u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u0442\u043a\u0430\u0442\u0430 \u0437\u0430\u044f\u0432\u043a\u0438 \u0442.\u043a. \u0431\u0438\u043b\u043b\u0438\u043d\u0433 \u043d\u0435 \u043f\u0440\u043e\u0448\u0451\u043b       \/\/       return new ApplyForOrderResult(null, $billingResult->error_code);      }      yield $this->chat->createChat($createResult->apply);      return new ApplyForOrderResult($createResult->apply);   } }<\/code><\/pre>\n<p>\u041d\u0430 \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u0438<\/p>\n<\/li>\n<\/ul>\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-359388","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359388","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=359388"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359388\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}