)]}'
{"doc/source/dsl/dsl_v2.rst":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f769b2dadfda8326724a56de08f21c6854ebcd39","unresolved":false,"context_lines":[{"line_number":978,"context_line":"   context."},{"line_number":979,"context_line":""},{"line_number":980,"context_line":""},{"line_number":981,"context_line":"Engine Commands"},{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_34d97084","line":981,"range":{"start_line":981,"start_character":0,"end_line":981,"end_character":15},"updated":"2017-02-21 19:09:22.000000000","message":"I suggest that we move this section under \"Direct workflows\" somewhere since it\u0027s relevant only for direct workflows. Somewhere we we describe what on-success/on-error/on-complete are described.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"d37670d3f959e5b0ed300e8a0e8c01a86dbe626e","unresolved":false,"context_lines":[{"line_number":978,"context_line":"   context."},{"line_number":979,"context_line":""},{"line_number":980,"context_line":""},{"line_number":981,"context_line":"Engine Commands"},{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfeb2761_133c89bd","line":981,"in_reply_to":"da36d5c6_34d97084","updated":"2017-04-03 13:28:33.000000000","message":"Done","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"4829ebadb098b936cdec2d07b8c99f60ee2d0cac","unresolved":false,"context_lines":[{"line_number":981,"context_line":"Engine Commands"},{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"},{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_91689bbc","line":984,"range":{"start_line":984,"start_character":64,"end_line":984,"end_character":72},"updated":"2017-02-20 15:46:50.000000000","message":"soft: saying anywhere might be misleading.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f769b2dadfda8326724a56de08f21c6854ebcd39","unresolved":false,"context_lines":[{"line_number":981,"context_line":"Engine Commands"},{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"},{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_f4cd18b8","line":984,"in_reply_to":"da36d5c6_81e753e3","updated":"2017-02-21 19:09:22.000000000","message":"Really \u0027anywhere\u0027 is not exactly precise, look at my previous comment.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"0738db62755861b86e40b10d4ad872583a2daa22","unresolved":false,"context_lines":[{"line_number":981,"context_line":"Engine Commands"},{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"},{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_81e753e3","line":984,"in_reply_to":"da36d5c6_91689bbc","updated":"2017-02-21 08:07:17.000000000","message":"I couldn\u0027t think of a better way to describe it. As far as I can tell it is anywhere that a task can be referenced","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"d37670d3f959e5b0ed300e8a0e8c01a86dbe626e","unresolved":false,"context_lines":[{"line_number":981,"context_line":"Engine Commands"},{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"},{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfeb2761_f34a4553","line":984,"in_reply_to":"da36d5c6_f4cd18b8","updated":"2017-04-03 13:28:33.000000000","message":"Done","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f769b2dadfda8326724a56de08f21c6854ebcd39","unresolved":false,"context_lines":[{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"},{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""},{"line_number":988,"context_line":"- succeed, will end the current workflow with the state SUCCESS."}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_94377caf","line":985,"range":{"start_line":985,"start_character":59,"end_line":985,"end_character":68},"updated":"2017-02-21 19:09:22.000000000","message":"Although \"interrupt\" is technically correct (except maybe \"pause\" that interrupts the execution but temporarily) the main purpose is to change the workflow execution state directly.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"d37670d3f959e5b0ed300e8a0e8c01a86dbe626e","unresolved":false,"context_lines":[{"line_number":982,"context_line":"---------------"},{"line_number":983,"context_line":""},{"line_number":984,"context_line":"Mistral has a number of engine commands that can be called from anywhere that"},{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""},{"line_number":988,"context_line":"- succeed, will end the current workflow with the state SUCCESS."}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfeb2761_537331b2","line":985,"in_reply_to":"da36d5c6_94377caf","updated":"2017-04-03 13:28:33.000000000","message":"Done","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f769b2dadfda8326724a56de08f21c6854ebcd39","unresolved":false,"context_lines":[{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""},{"line_number":988,"context_line":"- succeed, will end the current workflow with the state SUCCESS."},{"line_number":989,"context_line":"- pause, will end the current workflow with the state PAUSED."},{"line_number":990,"context_line":"- fail, will end the current workflow with the state FAIL."},{"line_number":991,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_945e9ce7","line":988,"range":{"start_line":988,"start_character":0,"end_line":988,"end_character":64},"updated":"2017-02-21 19:09:22.000000000","message":"I suggest we follow the same style for lists across the doc. Please look at the section \"Attributes\" that is right before this new section.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"d37670d3f959e5b0ed300e8a0e8c01a86dbe626e","unresolved":false,"context_lines":[{"line_number":985,"context_line":"you would call a Workflow task. These commands are used to interrupt the"},{"line_number":986,"context_line":"Workflow execution."},{"line_number":987,"context_line":""},{"line_number":988,"context_line":"- succeed, will end the current workflow with the state SUCCESS."},{"line_number":989,"context_line":"- pause, will end the current workflow with the state PAUSED."},{"line_number":990,"context_line":"- fail, will end the current workflow with the state FAIL."},{"line_number":991,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfeb2761_336aedb2","line":988,"in_reply_to":"da36d5c6_945e9ce7","updated":"2017-04-03 13:28:33.000000000","message":"Done","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f769b2dadfda8326724a56de08f21c6854ebcd39","unresolved":false,"context_lines":[{"line_number":992,"context_line":"Each of the engine commands accepts a msg input, this is optional, but if"},{"line_number":993,"context_line":"provided will be stored in the state info on the workflow execution."},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"Unlike the succeed and fail, workflows that have been paused can be resumed"},{"line_number":996,"context_line":"later."},{"line_number":997,"context_line":""},{"line_number":998,"context_line":"YAML example"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_f4127808","line":995,"range":{"start_line":995,"start_character":11,"end_line":995,"end_character":18},"updated":"2017-02-21 19:09:22.000000000","message":"I suggest we use either italic or put succeed, fail etc. in quotes so that we see that we are talking about precise values that must be used in workflows.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"d37670d3f959e5b0ed300e8a0e8c01a86dbe626e","unresolved":false,"context_lines":[{"line_number":992,"context_line":"Each of the engine commands accepts a msg input, this is optional, but if"},{"line_number":993,"context_line":"provided will be stored in the state info on the workflow execution."},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"Unlike the succeed and fail, workflows that have been paused can be resumed"},{"line_number":996,"context_line":"later."},{"line_number":997,"context_line":""},{"line_number":998,"context_line":"YAML example"}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfeb2761_b39b9dc7","line":995,"in_reply_to":"da36d5c6_f4127808","updated":"2017-04-03 13:28:33.000000000","message":"Done","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f769b2dadfda8326724a56de08f21c6854ebcd39","unresolved":false,"context_lines":[{"line_number":1004,"context_line":"    version: \u00272.0\u0027"},{"line_number":1005,"context_line":""},{"line_number":1006,"context_line":"    send_error_mail:"},{"line_number":1007,"context_line":""},{"line_number":1008,"context_line":"      tasks:"},{"line_number":1009,"context_line":"        send_error_email:"},{"line_number":1010,"context_line":"          action: send_email"}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_f4299838","line":1007,"updated":"2017-02-21 19:09:22.000000000","message":"Soft: I\u0027d remove this empty line.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"d37670d3f959e5b0ed300e8a0e8c01a86dbe626e","unresolved":false,"context_lines":[{"line_number":1004,"context_line":"    version: \u00272.0\u0027"},{"line_number":1005,"context_line":""},{"line_number":1006,"context_line":"    send_error_mail:"},{"line_number":1007,"context_line":""},{"line_number":1008,"context_line":"      tasks:"},{"line_number":1009,"context_line":"        send_error_email:"},{"line_number":1010,"context_line":"          action: send_email"}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfeb2761_939e59b6","line":1007,"in_reply_to":"da36d5c6_f4299838","updated":"2017-04-03 13:28:33.000000000","message":"Done","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"f769b2dadfda8326724a56de08f21c6854ebcd39","unresolved":false,"context_lines":[{"line_number":1018,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":1019,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":1020,"context_line":"itself was successful."},{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"Workbooks"},{"line_number":1023,"context_line":"---------"},{"line_number":1024,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"da36d5c6_74c0482b","line":1021,"updated":"2017-02-21 19:09:22.000000000","message":"We also need to add an important info about how Mistral processes commands mixed with task names within one list. For example,\n\non-complete:\n  - taskX\n  - fail\n\nor\n\non-complete:\n  - taskA\n  - fail\n  - taskB\n\nThe rule here: Mistral processes the list one by one (it\u0027s an ordered structure), and runs tasks until it encounters a command that switches the workflow execution to a terminal state (succeed, fail). The rest of the list in this case is ignored. However, if there\u0027s \"pause\" in the middle of the list then task names after it are not ignored. They will continue to run once the workflow is resumed.\n\nThis might be a little tricky, I know :) In order to see all possible combinations you can look at the tests involving these commands, there\u0027s plenty of them.\n\n\nI\u0027m totally OK if it\u0027s addressed in a separate patch. Just don\u0027t mark the blueprint \"Implemented\" for now.","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"d37670d3f959e5b0ed300e8a0e8c01a86dbe626e","unresolved":false,"context_lines":[{"line_number":1018,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":1019,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":1020,"context_line":"itself was successful."},{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"Workbooks"},{"line_number":1023,"context_line":"---------"},{"line_number":1024,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfeb2761_b314bda1","line":1021,"in_reply_to":"da36d5c6_74c0482b","updated":"2017-04-03 13:28:33.000000000","message":"I had a go at this, I\u0027m not sure it is perfect yet but let me know what you think!","commit_id":"33ef64ac8e105b46848c282de73bc68a9a63e87f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf6a20e0960b597d2d1d53c4e73f41fe5670608b","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"-  **succeed** - will end the current workflow with the state SUCCESS."},{"line_number":436,"context_line":"-  **pause** - will end the current workflow with the state PAUSED."},{"line_number":437,"context_line":"-  **fail** - will end the current workflow with the state FAIL."},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"Each of the engine commands accepts a ``msg`` input, this is optional, but if"},{"line_number":440,"context_line":"provided will be stored in the state info on the workflow execution."}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_92d07821","line":437,"range":{"start_line":437,"start_character":59,"end_line":437,"end_character":63},"updated":"2017-04-04 06:42:27.000000000","message":"-\u003e ERROR","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"91d464437c00229cd8d10c29201c4a350679d732","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"-  **succeed** - will end the current workflow with the state SUCCESS."},{"line_number":436,"context_line":"-  **pause** - will end the current workflow with the state PAUSED."},{"line_number":437,"context_line":"-  **fail** - will end the current workflow with the state FAIL."},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"Each of the engine commands accepts a ``msg`` input, this is optional, but if"},{"line_number":440,"context_line":"provided will be stored in the state info on the workflow execution."}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ff52f3f_de01d4b1","line":437,"in_reply_to":"dfeb2761_92d07821","updated":"2017-04-13 08:47:08.000000000","message":"Done","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"edbce331ab9d04d5ab2e55fee6494f693b2875fe","unresolved":false,"context_lines":[{"line_number":436,"context_line":"-  **pause** - will end the current workflow with the state PAUSED."},{"line_number":437,"context_line":"-  **fail** - will end the current workflow with the state FAIL."},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"Each of the engine commands accepts a ``msg`` input, this is optional, but if"},{"line_number":440,"context_line":"provided will be stored in the state info on the workflow execution."},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"Unlike the ``succeed`` and ``fail``, workflows that have been paused can be"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_58d34561","line":439,"updated":"2017-04-03 17:07:40.000000000","message":"\"input, this\" -\u003e \"input. This\"","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"91d464437c00229cd8d10c29201c4a350679d732","unresolved":false,"context_lines":[{"line_number":436,"context_line":"-  **pause** - will end the current workflow with the state PAUSED."},{"line_number":437,"context_line":"-  **fail** - will end the current workflow with the state FAIL."},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"Each of the engine commands accepts a ``msg`` input, this is optional, but if"},{"line_number":440,"context_line":"provided will be stored in the state info on the workflow execution."},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"Unlike the ``succeed`` and ``fail``, workflows that have been paused can be"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ff52f3f_fef498d1","line":439,"in_reply_to":"dfeb2761_58d34561","updated":"2017-04-13 08:47:08.000000000","message":"Done","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"edbce331ab9d04d5ab2e55fee6494f693b2875fe","unresolved":false,"context_lines":[{"line_number":439,"context_line":"Each of the engine commands accepts a ``msg`` input, this is optional, but if"},{"line_number":440,"context_line":"provided will be stored in the state info on the workflow execution."},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"Unlike the ``succeed`` and ``fail``, workflows that have been paused can be"},{"line_number":443,"context_line":"resumed later."},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"YAML example"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_98554dc9","line":442,"updated":"2017-04-03 17:07:40.000000000","message":"I\u0027d re-word this as \"Workflows that have been ended with ``succeed`` or ``fail`` may not be resumed later, but workflows that have been ended with ``pause`` may be.\"","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"91d464437c00229cd8d10c29201c4a350679d732","unresolved":false,"context_lines":[{"line_number":439,"context_line":"Each of the engine commands accepts a ``msg`` input, this is optional, but if"},{"line_number":440,"context_line":"provided will be stored in the state info on the workflow execution."},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"Unlike the ``succeed`` and ``fail``, workflows that have been paused can be"},{"line_number":443,"context_line":"resumed later."},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"YAML example"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ff52f3f_1ef85cc2","line":442,"in_reply_to":"dfeb2761_98554dc9","updated":"2017-04-13 08:47:08.000000000","message":"Done","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"edbce331ab9d04d5ab2e55fee6494f693b2875fe","unresolved":false,"context_lines":[{"line_number":461,"context_line":"            - fail(msg\u003d\"Error email sent\")"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"In this example we have a short workflow with one task that sends an email,"},{"line_number":464,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":465,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":466,"context_line":"itself was successful."},{"line_number":467,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_78ecc9f2","line":464,"updated":"2017-04-03 17:07:40.000000000","message":"s/Workflow/workflow","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"91d464437c00229cd8d10c29201c4a350679d732","unresolved":false,"context_lines":[{"line_number":461,"context_line":"            - fail(msg\u003d\"Error email sent\")"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"In this example we have a short workflow with one task that sends an email,"},{"line_number":464,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":465,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":466,"context_line":"itself was successful."},{"line_number":467,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ff52f3f_3e60c032","line":464,"in_reply_to":"dfeb2761_78ecc9f2","updated":"2017-04-13 08:47:08.000000000","message":"Done","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"edbce331ab9d04d5ab2e55fee6494f693b2875fe","unresolved":false,"context_lines":[{"line_number":463,"context_line":"In this example we have a short workflow with one task that sends an email,"},{"line_number":464,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":465,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":466,"context_line":"itself was successful."},{"line_number":467,"context_line":""},{"line_number":468,"context_line":".. code-block:: yaml"},{"line_number":469,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_d8d07522","line":466,"updated":"2017-04-03 17:07:40.000000000","message":"I don\u0027t follow this sentence at all.","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"3ab7f4648cb4dfd3868391e3b29ea589dbc16423","unresolved":false,"context_lines":[{"line_number":463,"context_line":"In this example we have a short workflow with one task that sends an email,"},{"line_number":464,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":465,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":466,"context_line":"itself was successful."},{"line_number":467,"context_line":""},{"line_number":468,"context_line":".. code-block:: yaml"},{"line_number":469,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_bdbb4d70","line":466,"in_reply_to":"dfeb2761_52ad5086","updated":"2017-04-04 07:44:12.000000000","message":"Yeah, I found that tricky to word. The idea is that you have a workflow that does something and sends an error email - if that works, the workflow will complete with SUCCESS. This might be okay, but if you call that workflow from another workflow it is very hard to tell that it has failed.\n\nWe follow this pattern in TripleO (but we send messages on zaqar, not via email): https://github.com/openstack/tripleo-common/blob/master/workbooks/baremetal.yaml#L91-L92\n\nSo a more complete example might be:\n\n    create_vm:\n        tasks:\n            create:\n                action: nova......\n                on-error: send_error_mail\n            send_error_email:\n                action: send_email\n                input:\n                    to_addrs\u003d[\u0027admin@mysite.org\u0027]\n                    body\u003d\u0027Workflow failed\u0027\n                on-complete:\n                    - fail(msg\u003d\"Error email sent\")\n\nWithout the on-complete, this workflow will always complete with SUCCESS (unless the email sending fails). So, if I were to call it from another workflow...\n\n\n    workflow2:\n        tasks:\n            workflow: create_vm\n            on-error: \u003c--- never called when the nova action fails.","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"91d464437c00229cd8d10c29201c4a350679d732","unresolved":false,"context_lines":[{"line_number":463,"context_line":"In this example we have a short workflow with one task that sends an email,"},{"line_number":464,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":465,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":466,"context_line":"itself was successful."},{"line_number":467,"context_line":""},{"line_number":468,"context_line":".. code-block:: yaml"},{"line_number":469,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ff52f3f_5e5b8486","line":466,"in_reply_to":"dfeb2761_bdbb4d70","updated":"2017-04-13 08:47:08.000000000","message":"Done","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf6a20e0960b597d2d1d53c4e73f41fe5670608b","unresolved":false,"context_lines":[{"line_number":463,"context_line":"In this example we have a short workflow with one task that sends an email,"},{"line_number":464,"context_line":"then it marks the Workflow as having failed. This can be useful, as you want"},{"line_number":465,"context_line":"to make it clear which of your workflows had an error, even if the workflow"},{"line_number":466,"context_line":"itself was successful."},{"line_number":467,"context_line":""},{"line_number":468,"context_line":".. code-block:: yaml"},{"line_number":469,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_52ad5086","line":466,"in_reply_to":"dfeb2761_d8d07522","updated":"2017-04-04 06:42:27.000000000","message":"I would say I don\u0027t even understand the idea of such workflow :) Can we come up with something simpler like failing the entire workflow if we see that a variable in the context is not what we expected at a certain step?","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cf6a20e0960b597d2d1d53c4e73f41fe5670608b","unresolved":false,"context_lines":[{"line_number":478,"context_line":"executed in order until the workflow reaches a terminal state. So in this case"},{"line_number":479,"context_line":"``taskA`` is called first, then the ``fail`` engine command and ``taskB`` would"},{"line_number":480,"context_line":"never be called. ``taskB`` would not be called if ``succeed`` was used in this"},{"line_number":481,"context_line":"example either, but if ``pause`` was used ``taskB`` would be called after the"},{"line_number":482,"context_line":"workflow is resumed."},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"Transitions with YAQL expressions"},{"line_number":485,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dfeb2761_72c73447","line":482,"range":{"start_line":481,"start_character":16,"end_line":482,"end_character":20},"updated":"2017-04-04 06:42:27.000000000","message":"Yes, this is a important information to tell. I\u0027d suggest we even insert a separate (but simple) WF example to illustrate that.","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"cdd27ae107ebca25ea93b4c87b754a2e56af20e0","unresolved":false,"context_lines":[{"line_number":479,"context_line":"``taskA`` is called first, then the ``fail`` engine command and ``taskB`` would"},{"line_number":480,"context_line":"never be called. ``taskB`` would not be called if ``succeed`` was used in this"},{"line_number":481,"context_line":"example either, but if ``pause`` was used ``taskB`` would be called after the"},{"line_number":482,"context_line":"workflow is resumed."},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"Transitions with YAQL expressions"},{"line_number":485,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ff52f3f_dce0bc99","line":482,"in_reply_to":"9ff52f3f_21554551","updated":"2017-04-13 09:22:50.000000000","message":"https://bugs.launchpad.net/mistral/+bug/1682377","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"91d464437c00229cd8d10c29201c4a350679d732","unresolved":false,"context_lines":[{"line_number":479,"context_line":"``taskA`` is called first, then the ``fail`` engine command and ``taskB`` would"},{"line_number":480,"context_line":"never be called. ``taskB`` would not be called if ``succeed`` was used in this"},{"line_number":481,"context_line":"example either, but if ``pause`` was used ``taskB`` would be called after the"},{"line_number":482,"context_line":"workflow is resumed."},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"Transitions with YAQL expressions"},{"line_number":485,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"9ff52f3f_21554551","line":482,"in_reply_to":"dfeb2761_72c73447","updated":"2017-04-13 08:47:08.000000000","message":"Sounds like a good idea - can you open a bug or add this in a follow up?","commit_id":"6fb2916d5d3182609a188fc95c634a2d38731d49"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"1152a604cd8b699152ef8bf129b4df8ba53eeeb6","unresolved":false,"context_lines":[{"line_number":457,"context_line":"          publish:"},{"line_number":458,"context_line":"            vm_id: \u003c% task(create_server).result.id %\u003e"},{"line_number":459,"context_line":"          on-complete:"},{"line_number":460,"context_line":"            - fail: \u003c% not $.vm_id %\u003e"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"In this example we have a short workflow with one task that creates a server"},{"line_number":463,"context_line":"in Nova. The task publishes the ID of the virtual machine, but if this value"}],"source_content_type":"text/x-rst","patch_set":5,"id":"9ff52f3f_bc197889","line":460,"range":{"start_line":460,"start_character":12,"end_line":460,"end_character":37},"updated":"2017-04-13 09:27:20.000000000","message":"Yes, this looks good enough to me now.","commit_id":"0ad8cdd65c18d8f8b2e9e2e7629c61d0c833249a"}]}
