)]}'
{"doc/source/user/wf_lang_v2.rst":[{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":543,"context_line":"Having that said, it\u0027s important to know the order in which these clauses"},{"line_number":544,"context_line":"are processed by Mistral."},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"YAML example:"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":".. code-block:: mistral"},{"line_number":549,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_bb126757","line":546,"range":{"start_line":546,"start_character":0,"end_line":546,"end_character":13},"updated":"2018-02-19 14:40:43.000000000","message":"I think, we can delete this line.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":543,"context_line":"Having that said, it\u0027s important to know the order in which these clauses"},{"line_number":544,"context_line":"are processed by Mistral."},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"YAML example:"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":".. code-block:: mistral"},{"line_number":549,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_61bbd0c3","line":546,"range":{"start_line":546,"start_character":0,"end_line":546,"end_character":13},"in_reply_to":"3fa0c359_bb126757","updated":"2018-02-19 16:01:31.000000000","message":"I see no harm in it but ok. Let\u0027s delete it.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":547,"context_line":""},{"line_number":548,"context_line":".. code-block:: mistral"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    taskA:"},{"line_number":551,"context_line":"     action: my_action"},{"line_number":552,"context_line":"     on-success:"},{"line_number":553,"context_line":"       - taskB"},{"line_number":554,"context_line":"       - taskC"},{"line_number":555,"context_line":"     on-complete:"},{"line_number":556,"context_line":"       - taskD"},{"line_number":557,"context_line":"       - taskE"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"In this example, if the task action (\u0027my_action\u0027) completes successfully then"},{"line_number":560,"context_line":"Mistral will first process the \u0027on-success\u0027 clause and schedule tasks \u0027taskB\u0027"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_d8fe5937","line":557,"range":{"start_line":550,"start_character":4,"end_line":557,"end_character":14},"updated":"2018-02-19 14:40:43.000000000","message":"I generally find it more pleasing when the example code is easily runnable without much work or at least have implicit naming that self-describes the semantic interpretation. Unfortunately, there are too many tasks here for a succinct example for a complete workflow. But I\u0027d say:\n\nthe_first_task:\n  action: std.http url\u003d\"https://www.openstack.org/\"\n  on-success:\n    - web_ok_1\n    - web_ok_2\n  on-complete:\n    - always_executed_1\n    - always_executed_2","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":547,"context_line":""},{"line_number":548,"context_line":".. code-block:: mistral"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    taskA:"},{"line_number":551,"context_line":"     action: my_action"},{"line_number":552,"context_line":"     on-success:"},{"line_number":553,"context_line":"       - taskB"},{"line_number":554,"context_line":"       - taskC"},{"line_number":555,"context_line":"     on-complete:"},{"line_number":556,"context_line":"       - taskD"},{"line_number":557,"context_line":"       - taskE"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"In this example, if the task action (\u0027my_action\u0027) completes successfully then"},{"line_number":560,"context_line":"Mistral will first process the \u0027on-success\u0027 clause and schedule tasks \u0027taskB\u0027"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_a1f8f848","line":557,"range":{"start_line":550,"start_character":4,"end_line":557,"end_character":14},"in_reply_to":"3fa0c359_d8fe5937","updated":"2018-02-19 16:01:31.000000000","message":"Aaah, I don\u0027t know... To me it\u0027s a matter of taste. I\u0027d prefer to keep conciseness in this case and make it look like an abstract mathematical example. To me \"always_executed_1\" looks a little long maybe. I\u0027m not completely against your suggestion though, let\u0027s see what other reviewers say.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":557,"context_line":"       - taskE"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"In this example, if the task action (\u0027my_action\u0027) completes successfully then"},{"line_number":560,"context_line":"Mistral will first process the \u0027on-success\u0027 clause and schedule tasks \u0027taskB\u0027"},{"line_number":561,"context_line":"and \u0027taskC\u0027 and then process the \u0027on-complete\u0027 clause and schedule \u0027taskC\u0027 and"},{"line_number":562,"context_line":"\u0027taskE\u0027. In most cases, this processing order is not so important but there are"},{"line_number":563,"context_line":"situations when it matters, especially when both \u0027on-success\u0027 and \u0027on-complete\u0027"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_f8b1d5e2","line":560,"range":{"start_line":560,"start_character":54,"end_line":560,"end_character":64},"updated":"2018-02-19 14:40:43.000000000","message":"I\u0027m afraid schedule is explained anywhere, so it would be good to add a definition somewhere. Basically means queued for execution, right?","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":557,"context_line":"       - taskE"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"In this example, if the task action (\u0027my_action\u0027) completes successfully then"},{"line_number":560,"context_line":"Mistral will first process the \u0027on-success\u0027 clause and schedule tasks \u0027taskB\u0027"},{"line_number":561,"context_line":"and \u0027taskC\u0027 and then process the \u0027on-complete\u0027 clause and schedule \u0027taskC\u0027 and"},{"line_number":562,"context_line":"\u0027taskE\u0027. In most cases, this processing order is not so important but there are"},{"line_number":563,"context_line":"situations when it matters, especially when both \u0027on-success\u0027 and \u0027on-complete\u0027"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_21ae2898","line":560,"range":{"start_line":560,"start_character":54,"end_line":560,"end_character":64},"in_reply_to":"3fa0c359_f8b1d5e2","updated":"2018-02-19 16:01:31.000000000","message":"Well, I understand your concern and you\u0027re right that we need to explain it somewhere. I just didn\u0027t want do this in details in the specification of the workflow language because runtime execution mechanism IMO is a completely different topic. But ok, I still agree that at least we need to give understanding of it. I\u0027ll add it somewhere.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":557,"context_line":"       - taskE"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"In this example, if the task action (\u0027my_action\u0027) completes successfully then"},{"line_number":560,"context_line":"Mistral will first process the \u0027on-success\u0027 clause and schedule tasks \u0027taskB\u0027"},{"line_number":561,"context_line":"and \u0027taskC\u0027 and then process the \u0027on-complete\u0027 clause and schedule \u0027taskC\u0027 and"},{"line_number":562,"context_line":"\u0027taskE\u0027. In most cases, this processing order is not so important but there are"},{"line_number":563,"context_line":"situations when it matters, especially when both \u0027on-success\u0027 and \u0027on-complete\u0027"},{"line_number":564,"context_line":"lists have `engine commands \u003c#engine-commands\u003e`__ that are explained later in"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_b876edd7","line":561,"range":{"start_line":560,"start_character":70,"end_line":561,"end_character":10},"updated":"2018-02-19 14:40:43.000000000","message":"\"schedules taskB, then schedules taskC\"\nWith such wording we can refer that the scheduling happens sequentially, and the explanation can describe that scheduled tasks may be executed in parallel.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":557,"context_line":"       - taskE"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"In this example, if the task action (\u0027my_action\u0027) completes successfully then"},{"line_number":560,"context_line":"Mistral will first process the \u0027on-success\u0027 clause and schedule tasks \u0027taskB\u0027"},{"line_number":561,"context_line":"and \u0027taskC\u0027 and then process the \u0027on-complete\u0027 clause and schedule \u0027taskC\u0027 and"},{"line_number":562,"context_line":"\u0027taskE\u0027. In most cases, this processing order is not so important but there are"},{"line_number":563,"context_line":"situations when it matters, especially when both \u0027on-success\u0027 and \u0027on-complete\u0027"},{"line_number":564,"context_line":"lists have `engine commands \u003c#engine-commands\u003e`__ that are explained later in"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_819e1c61","line":561,"range":{"start_line":560,"start_character":70,"end_line":561,"end_character":10},"in_reply_to":"3fa0c359_b876edd7","updated":"2018-02-19 16:01:31.000000000","message":"Parallelism is mentioned at https://docs.openstack.org/mistral/latest/user/wf_lang_v2.html#fork","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":561,"context_line":"and \u0027taskC\u0027 and then process the \u0027on-complete\u0027 clause and schedule \u0027taskC\u0027 and"},{"line_number":562,"context_line":"\u0027taskE\u0027. In most cases, this processing order is not so important but there are"},{"line_number":563,"context_line":"situations when it matters, especially when both \u0027on-success\u0027 and \u0027on-complete\u0027"},{"line_number":564,"context_line":"lists have `engine commands \u003c#engine-commands\u003e`__ that are explained later in"},{"line_number":565,"context_line":"this document."},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"If \u0027on-success\u0027 and \u0027on-error\u0027 both defined in a task definition, they never"},{"line_number":568,"context_line":"clash because they are mutually exclusive which means that only one of them can"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_98545123","line":565,"range":{"start_line":564,"start_character":50,"end_line":565,"end_character":14},"updated":"2018-02-19 14:40:43.000000000","message":"I\u0027d try to avoid this type of reference as it makes refactoring harder and doesn\u0027t really add to the text if the reference link before works correctly.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":561,"context_line":"and \u0027taskC\u0027 and then process the \u0027on-complete\u0027 clause and schedule \u0027taskC\u0027 and"},{"line_number":562,"context_line":"\u0027taskE\u0027. In most cases, this processing order is not so important but there are"},{"line_number":563,"context_line":"situations when it matters, especially when both \u0027on-success\u0027 and \u0027on-complete\u0027"},{"line_number":564,"context_line":"lists have `engine commands \u003c#engine-commands\u003e`__ that are explained later in"},{"line_number":565,"context_line":"this document."},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"If \u0027on-success\u0027 and \u0027on-error\u0027 both defined in a task definition, they never"},{"line_number":568,"context_line":"clash because they are mutually exclusive which means that only one of them can"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_215dc8e8","line":565,"range":{"start_line":564,"start_character":50,"end_line":565,"end_character":14},"in_reply_to":"3fa0c359_98545123","updated":"2018-02-19 16:01:31.000000000","message":"I myself find such links very useful. Refactoring is a responsibility of the one who does it so honestly I don\u0027t see a big issue.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":27349,"name":"Hardik Jasani","email":"hardik.jasani@nokia.com","username":"hardikj"},"change_message_id":"7ff0bbd16fc22fd9113fa426f71433a330060534","unresolved":false,"context_lines":[{"line_number":564,"context_line":"lists have `engine commands \u003c#engine-commands\u003e`__ that are explained later in"},{"line_number":565,"context_line":"this document."},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"If \u0027on-success\u0027 and \u0027on-error\u0027 both defined in a task definition, they never"},{"line_number":568,"context_line":"clash because they are mutually exclusive which means that only one of them can"},{"line_number":569,"context_line":"be processed depending on whether the task action failed or succeeded."},{"line_number":570,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_630bdf23","line":567,"range":{"start_line":567,"start_character":0,"end_line":567,"end_character":65},"updated":"2018-02-19 11:12:40.000000000","message":"Grammar: If both \u0027on-success\u0027 and \u0027on-error\u0027 are defined in the task definition,","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":564,"context_line":"lists have `engine commands \u003c#engine-commands\u003e`__ that are explained later in"},{"line_number":565,"context_line":"this document."},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"If \u0027on-success\u0027 and \u0027on-error\u0027 both defined in a task definition, they never"},{"line_number":568,"context_line":"clash because they are mutually exclusive which means that only one of them can"},{"line_number":569,"context_line":"be processed depending on whether the task action failed or succeeded."},{"line_number":570,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_613190a2","line":567,"range":{"start_line":567,"start_character":0,"end_line":567,"end_character":65},"in_reply_to":"3fa0c359_630bdf23","updated":"2018-02-19 16:01:31.000000000","message":"Done","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":605,"context_line":"Workflows that have been ended with ``succeed`` or ``fail`` may not be resumed"},{"line_number":606,"context_line":"later, but workflows that have been ended with ``pause`` may be."},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"YAML example"},{"line_number":609,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":".. code-block:: mistral"},{"line_number":612,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_1b811b4b","line":609,"range":{"start_line":608,"start_character":0,"end_line":609,"end_character":12},"updated":"2018-02-19 14:40:43.000000000","message":"I know, this change is not concerned with this part but this should be removed as it is translated to a header which doesn\u0027t make sense.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":605,"context_line":"Workflows that have been ended with ``succeed`` or ``fail`` may not be resumed"},{"line_number":606,"context_line":"later, but workflows that have been ended with ``pause`` may be."},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"YAML example"},{"line_number":609,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":".. code-block:: mistral"},{"line_number":612,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_01f3ec0b","line":609,"range":{"start_line":608,"start_character":0,"end_line":609,"end_character":12},"in_reply_to":"3fa0c359_1b811b4b","updated":"2018-02-19 16:01:31.000000000","message":"That was the exact initial intention: to make it appear in the header so that we could immediately jump to an example of a thing described in some section. Maybe the problem here is that it\u0027s displayed on the same level as \"Engine Commands\".\n\nBut if we want to change it then we need to change it throughout the whole doc.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":631,"context_line":"    on-complete:"},{"line_number":632,"context_line":"      - taskA"},{"line_number":633,"context_line":"      - fail"},{"line_number":634,"context_line":"      - taskB"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"When the engine commands are used with task names in a single list, they are"},{"line_number":637,"context_line":"processed one at a time until the workflow reaches a terminal state. In the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_3be97719","line":634,"range":{"start_line":634,"start_character":8,"end_line":634,"end_character":13},"updated":"2018-02-19 14:40:43.000000000","message":"call this \"never_scheduled_task\"","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":638,"context_line":"above example, the ``on-complete`` has three steps to complete - these are"},{"line_number":639,"context_line":"executed in order until the workflow reaches a terminal state. So in this case"},{"line_number":640,"context_line":"``taskA`` is scheduled first, then the ``fail`` engine command sets the"},{"line_number":641,"context_line":"workflow to ERROR and ``taskB`` is never scheduled. ``taskB`` would not be"},{"line_number":642,"context_line":"scheduled if ``succeed`` was used in this example either."},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"As said above, the ``pause`` command pauses the workflow. This means that the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_db92d39f","line":641,"range":{"start_line":641,"start_character":8,"end_line":641,"end_character":12},"updated":"2018-02-19 14:40:43.000000000","message":"state to","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":638,"context_line":"above example, the ``on-complete`` has three steps to complete - these are"},{"line_number":639,"context_line":"executed in order until the workflow reaches a terminal state. So in this case"},{"line_number":640,"context_line":"``taskA`` is scheduled first, then the ``fail`` engine command sets the"},{"line_number":641,"context_line":"workflow to ERROR and ``taskB`` is never scheduled. ``taskB`` would not be"},{"line_number":642,"context_line":"scheduled if ``succeed`` was used in this example either."},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"As said above, the ``pause`` command pauses the workflow. This means that the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_c17d041d","line":641,"range":{"start_line":641,"start_character":8,"end_line":641,"end_character":12},"in_reply_to":"3fa0c359_db92d39f","updated":"2018-02-19 16:01:31.000000000","message":"Done","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":641,"context_line":"workflow to ERROR and ``taskB`` is never scheduled. ``taskB`` would not be"},{"line_number":642,"context_line":"scheduled if ``succeed`` was used in this example either."},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"As said above, the ``pause`` command pauses the workflow. This means that the"},{"line_number":645,"context_line":"workflow can continue but only after the corresponding resume command comes"},{"line_number":646,"context_line":"through the API. The resume command is practically nothing but setting the"},{"line_number":647,"context_line":"state of the execution to RUNNING manually."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_5bd56342","line":644,"range":{"start_line":644,"start_character":0,"end_line":644,"end_character":15},"updated":"2018-02-19 14:40:43.000000000","message":"delete.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":641,"context_line":"workflow to ERROR and ``taskB`` is never scheduled. ``taskB`` would not be"},{"line_number":642,"context_line":"scheduled if ``succeed`` was used in this example either."},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"As said above, the ``pause`` command pauses the workflow. This means that the"},{"line_number":645,"context_line":"workflow can continue but only after the corresponding resume command comes"},{"line_number":646,"context_line":"through the API. The resume command is practically nothing but setting the"},{"line_number":647,"context_line":"state of the execution to RUNNING manually."}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_e178402c","line":644,"range":{"start_line":644,"start_character":0,"end_line":644,"end_character":15},"in_reply_to":"3fa0c359_5bd56342","updated":"2018-02-19 16:01:31.000000000","message":"Ok, Done :)","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":642,"context_line":"scheduled if ``succeed`` was used in this example either."},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"As said above, the ``pause`` command pauses the workflow. This means that the"},{"line_number":645,"context_line":"workflow can continue but only after the corresponding resume command comes"},{"line_number":646,"context_line":"through the API. The resume command is practically nothing but setting the"},{"line_number":647,"context_line":"state of the execution to RUNNING manually."},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"YAML example:"},{"line_number":650,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_9b168bf1","line":647,"range":{"start_line":645,"start_character":55,"end_line":647,"end_character":43},"updated":"2018-02-19 14:40:43.000000000","message":"This means there is no resume. We should try to avoid introducing it if not necessary. May be better say: \n\nthe workflow execution can continue when its state is set to RUNNING by using the update Rest API call. (Using the API word to reference the Rest API should be consistent throughout the document)","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":642,"context_line":"scheduled if ``succeed`` was used in this example either."},{"line_number":643,"context_line":""},{"line_number":644,"context_line":"As said above, the ``pause`` command pauses the workflow. This means that the"},{"line_number":645,"context_line":"workflow can continue but only after the corresponding resume command comes"},{"line_number":646,"context_line":"through the API. The resume command is practically nothing but setting the"},{"line_number":647,"context_line":"state of the execution to RUNNING manually."},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"YAML example:"},{"line_number":650,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_e19da057","line":647,"range":{"start_line":645,"start_character":55,"end_line":647,"end_character":43},"in_reply_to":"3fa0c359_9b168bf1","updated":"2018-02-19 16:01:31.000000000","message":"Ok, agree. Done.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":646,"context_line":"through the API. The resume command is practically nothing but setting the"},{"line_number":647,"context_line":"state of the execution to RUNNING manually."},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"YAML example:"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":".. code-block:: mistral"},{"line_number":652,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_1bf6fbfa","line":649,"range":{"start_line":649,"start_character":0,"end_line":649,"end_character":13},"updated":"2018-02-19 14:40:43.000000000","message":"I think, this is unnecessary.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":646,"context_line":"through the API. The resume command is practically nothing but setting the"},{"line_number":647,"context_line":"state of the execution to RUNNING manually."},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"YAML example:"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":".. code-block:: mistral"},{"line_number":652,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_01b20ce7","line":649,"range":{"start_line":649,"start_character":0,"end_line":649,"end_character":13},"in_reply_to":"3fa0c359_1bf6fbfa","updated":"2018-02-19 16:01:31.000000000","message":"Done","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":657,"context_line":""},{"line_number":658,"context_line":"In this case when Mistral processes the \u0027on-complete\u0027 clause it will schedule"},{"line_number":659,"context_line":"``taskA`` and then set the workflow state to PAUSED, and stop scheduling new"},{"line_number":660,"context_line":"tasks. However, if the workflow is later resumed manually through the Mistral"},{"line_number":661,"context_line":"API then Mistral will schedule ``taskB`` because in the \u0027on-complete\u0027 list it"},{"line_number":662,"context_line":"goes right after the ``pause`` command."},{"line_number":663,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_1be03bfa","line":660,"range":{"start_line":660,"start_character":35,"end_line":660,"end_character":58},"updated":"2018-02-19 14:40:43.000000000","message":"let\u0027s try not to use resume here either","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":657,"context_line":""},{"line_number":658,"context_line":"In this case when Mistral processes the \u0027on-complete\u0027 clause it will schedule"},{"line_number":659,"context_line":"``taskA`` and then set the workflow state to PAUSED, and stop scheduling new"},{"line_number":660,"context_line":"tasks. However, if the workflow is later resumed manually through the Mistral"},{"line_number":661,"context_line":"API then Mistral will schedule ``taskB`` because in the \u0027on-complete\u0027 list it"},{"line_number":662,"context_line":"goes right after the ``pause`` command."},{"line_number":663,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_a1d558e7","line":660,"range":{"start_line":660,"start_character":35,"end_line":660,"end_character":58},"in_reply_to":"3fa0c359_1be03bfa","updated":"2018-02-19 16:01:31.000000000","message":"Previously, I used \"resume command\" and I completely agree with you that it was a mistake. But in this sentence it\u0027s not really a special term, it\u0027s rather a regular word from the natural language to describe the semantics of the operation w/o technical details (update call on the API bla-bla-bla). However, I\u0027d delete the part \"through the Mistral API\" (done).","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"6dd6317e6e4012a5266bef565e8d7acca70dba72","unresolved":false,"context_lines":[{"line_number":661,"context_line":"API then Mistral will schedule ``taskB`` because in the \u0027on-complete\u0027 list it"},{"line_number":662,"context_line":"goes right after the ``pause`` command."},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"Given the order in which Mistral processes \u0027on-success\u0027 (or \u0027on-error\u0027) and"},{"line_number":665,"context_line":"\u0027on-complete\u0027 clauses it\u0027s important to understand what will happen if both"},{"line_number":666,"context_line":"clauses have engine commands listed in them."},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"YAML Example:"},{"line_number":669,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_7b805f8c","line":666,"range":{"start_line":664,"start_character":0,"end_line":666,"end_character":44},"updated":"2018-02-19 14:40:43.000000000","message":"I feel like this is redundant with all the info that is already in the document. In my opinion, this should be incorporated in the description of the on-* words. Best would be a python example, like:\n\n    result \u003d the_action()\n\n    if success(result):\n        sequentially_process(on_success_clauses)\n    else:\n        sequentially_process(on_error_clauses)\n\n    sequentially_process(on_complete_clauses)\n\nAnd adding that sequential processing always considers the current state of the execution (to address the case of fail and complete)","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"b9e4e30265a660721db6524000db9a58e2355bca","unresolved":false,"context_lines":[{"line_number":661,"context_line":"API then Mistral will schedule ``taskB`` because in the \u0027on-complete\u0027 list it"},{"line_number":662,"context_line":"goes right after the ``pause`` command."},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"Given the order in which Mistral processes \u0027on-success\u0027 (or \u0027on-error\u0027) and"},{"line_number":665,"context_line":"\u0027on-complete\u0027 clauses it\u0027s important to understand what will happen if both"},{"line_number":666,"context_line":"clauses have engine commands listed in them."},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"YAML Example:"},{"line_number":669,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_b5226b00","line":666,"range":{"start_line":664,"start_character":0,"end_line":666,"end_character":44},"in_reply_to":"3fa0c359_41625440","updated":"2018-02-19 20:50:26.000000000","message":"Sorry, I misguided this missile :)\n\nI think this explanation and the following example should go up to the description of the on-* words. I think, the semantics can be explained without knowing the difference between engine commands and tasks. These can be referred as items that are processed successively. Untangling the semantics of the commands from the meaning the on-* words would significantly simplify the description.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"40fd350522a8ca6c72999779ce4c2110ea347c8d","unresolved":false,"context_lines":[{"line_number":661,"context_line":"API then Mistral will schedule ``taskB`` because in the \u0027on-complete\u0027 list it"},{"line_number":662,"context_line":"goes right after the ``pause`` command."},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"Given the order in which Mistral processes \u0027on-success\u0027 (or \u0027on-error\u0027) and"},{"line_number":665,"context_line":"\u0027on-complete\u0027 clauses it\u0027s important to understand what will happen if both"},{"line_number":666,"context_line":"clauses have engine commands listed in them."},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"YAML Example:"},{"line_number":669,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"3fa0c359_41625440","line":666,"range":{"start_line":664,"start_character":0,"end_line":666,"end_character":44},"in_reply_to":"3fa0c359_7b805f8c","updated":"2018-02-19 16:01:31.000000000","message":"This may be redundant in the mathematical sense, yes. But I don\u0027t want the doc to be too dry. I added this section here to emphasize that there may be problems if a workflow author doesn\u0027t pay attention to this semantics. And from our experience people really have hard time with such situations.\n\nAs far as using Python, I\u0027m against it really. From lang and API perspective there\u0027s no such thing as Python in Mistral.","commit_id":"788af18169fe33a04efdbe1a90d7760357fbf556"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"743edc88be882757f9ebd4dae2e4a5509be103a3","unresolved":false,"context_lines":[{"line_number":591,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"Mistral has a number of engine commands that can be called within direct"},{"line_number":594,"context_line":"workflows. These commands are used to change the workflow state."},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"-  **succeed** - will end the current workflow and set its state to SUCCESS."},{"line_number":597,"context_line":"-  **pause** - will end the current workflow and set its state to PAUSED."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_5507671d","line":594,"range":{"start_line":594,"start_character":48,"end_line":594,"end_character":57},"updated":"2018-02-19 21:14:04.000000000","message":"I just realized that workflow should be \"workflow execution\" or \"execution\" in all places where it is used in this context.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"26a27e575873187752a85f00a949a56ea1423ef9","unresolved":false,"context_lines":[{"line_number":591,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"Mistral has a number of engine commands that can be called within direct"},{"line_number":594,"context_line":"workflows. These commands are used to change the workflow state."},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"-  **succeed** - will end the current workflow and set its state to SUCCESS."},{"line_number":597,"context_line":"-  **pause** - will end the current workflow and set its state to PAUSED."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_932420c8","line":594,"range":{"start_line":594,"start_character":48,"end_line":594,"end_character":57},"in_reply_to":"3fa0c359_5507671d","updated":"2018-02-20 08:33:46.000000000","message":"We can do it but I\u0027m not sure we need to. I distinguish two cases when describing things. The first one is when I talk about API model, so that I need to be as precise as possible and then I use the terms \"workflow definition\", \"workflow execution\" and so on. However, in this case I just use the natural language to talk about things. So from that perspective, we run workflows, not workflow executions. We naturally say \"workflow is running\", \"workflow completed\" etc. To me this is completely fine.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"a9795921b825852eec82687816f053c7ad6cd88e","unresolved":false,"context_lines":[{"line_number":591,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"Mistral has a number of engine commands that can be called within direct"},{"line_number":594,"context_line":"workflows. These commands are used to change the workflow state."},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"-  **succeed** - will end the current workflow and set its state to SUCCESS."},{"line_number":597,"context_line":"-  **pause** - will end the current workflow and set its state to PAUSED."}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_67a8921f","line":594,"range":{"start_line":594,"start_character":48,"end_line":594,"end_character":57},"in_reply_to":"3fa0c359_932420c8","updated":"2018-02-21 09:35:03.000000000","message":"It\u0027s probably my background that makes me hunt down these type of deteriorations. I contributed quite a bit to standards and wrote scientific papers. I came to respect the fact that fundamental things should be called the same way every time, otherwise they create confusion.\n\nIf I could, I would propose to change the Mistral nomenclature to use Workflow Specification when referring to the definition and use Workflow when referring to the execution. Using the same word interchangeably in a spec documentation like this seems odd to me and suggests that there is some deeper issue. Just as you described.\n\nAs I can see, the engine commands still have other aspects that may not have been addressed yet, like sub-workflows, already scheduled tasks and similar stuff.\n\nAs with the other points, let\u0027s move on for now. I just wanted to indicate my opinion and I\u0027m more that happy to discuss other points of views.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"743edc88be882757f9ebd4dae2e4a5509be103a3","unresolved":false,"context_lines":[{"line_number":593,"context_line":"Mistral has a number of engine commands that can be called within direct"},{"line_number":594,"context_line":"workflows. These commands are used to change the workflow state."},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"-  **succeed** - will end the current workflow and set its state to SUCCESS."},{"line_number":597,"context_line":"-  **pause** - will end the current workflow and set its state to PAUSED."},{"line_number":598,"context_line":"-  **fail** - will end the current workflow and set its state to ERROR."},{"line_number":599,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_b80d8236","line":596,"range":{"start_line":596,"start_character":38,"end_line":596,"end_character":46},"updated":"2018-02-19 21:14:04.000000000","message":"like in this list","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"743edc88be882757f9ebd4dae2e4a5509be103a3","unresolved":false,"context_lines":[{"line_number":603,"context_line":"Workflows that have been ended with ``succeed`` or ``fail`` may not be resumed"},{"line_number":604,"context_line":"later, but workflows that have been ended with ``pause`` may be."},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"YAML example"},{"line_number":607,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":".. code-block:: mistral"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_d87dee6e","line":606,"range":{"start_line":606,"start_character":0,"end_line":606,"end_character":12},"updated":"2018-02-19 21:14:04.000000000","message":"Change to \"Workflow YAML example\"?","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"a9795921b825852eec82687816f053c7ad6cd88e","unresolved":false,"context_lines":[{"line_number":603,"context_line":"Workflows that have been ended with ``succeed`` or ``fail`` may not be resumed"},{"line_number":604,"context_line":"later, but workflows that have been ended with ``pause`` may be."},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"YAML example"},{"line_number":607,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":".. code-block:: mistral"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_07850ecf","line":606,"range":{"start_line":606,"start_character":0,"end_line":606,"end_character":12},"in_reply_to":"3fa0c359_131a507c","updated":"2018-02-21 09:35:03.000000000","message":"In my understanding a title should refer to the specifics of the content. This document contains 9 YAML examples. Why is this one so special that it has its own section? Because this is a section about \"Example workflow with engine commands\". I guess this is significantly more informative. I think it would be beneficial to change all YAML examples to specific titles. But let\u0027s move on and discuss later when the refactoring happens.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"26a27e575873187752a85f00a949a56ea1423ef9","unresolved":false,"context_lines":[{"line_number":603,"context_line":"Workflows that have been ended with ``succeed`` or ``fail`` may not be resumed"},{"line_number":604,"context_line":"later, but workflows that have been ended with ``pause`` may be."},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"YAML example"},{"line_number":607,"context_line":"\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027\u0027"},{"line_number":608,"context_line":""},{"line_number":609,"context_line":".. code-block:: mistral"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_131a507c","line":606,"range":{"start_line":606,"start_character":0,"end_line":606,"end_character":12},"in_reply_to":"3fa0c359_d87dee6e","updated":"2018-02-20 08:33:46.000000000","message":"I don\u0027t see much difference. In the initial version of the doc it\u0027s \"YAML example\" everywhere that goes to the header. If we want to change that, we need to change it in all the doc.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"743edc88be882757f9ebd4dae2e4a5509be103a3","unresolved":false,"context_lines":[{"line_number":657,"context_line":"schedule ``taskB`` because in the \u0027on-complete\u0027 list it goes right after the"},{"line_number":658,"context_line":"``pause`` command."},{"line_number":659,"context_line":""},{"line_number":660,"context_line":"Given the order in which Mistral processes \u0027on-success\u0027 (or \u0027on-error\u0027) and"},{"line_number":661,"context_line":"\u0027on-complete\u0027 clauses it\u0027s important to understand what will happen if both"},{"line_number":662,"context_line":"clauses have engine commands listed in them."},{"line_number":663,"context_line":""},{"line_number":664,"context_line":".. code-block:: mistral"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"    taskA:"},{"line_number":667,"context_line":"     action: my_action"},{"line_number":668,"context_line":"     on-error:"},{"line_number":669,"context_line":"       - taskB"},{"line_number":670,"context_line":"       - fail"},{"line_number":671,"context_line":"       - taskC"},{"line_number":672,"context_line":"     on-complete:"},{"line_number":673,"context_line":"       - taskD"},{"line_number":674,"context_line":"       - pause"},{"line_number":675,"context_line":"       - taskE"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"As was explained above, \u0027on-complete\u0027 is always processed after \u0027on-success\u0027"},{"line_number":678,"context_line":"(or \u0027on-error\u0027) because it plays the similar role as \u0027finally\u0027 in most general"},{"line_number":679,"context_line":"purpose programming languages. Let\u0027s consider two scenarios that can happen"},{"line_number":680,"context_line":"in the example above when \u0027taskA\u0027 runs, i.e. its action \u0027my_action\u0027 runs."},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"-  If \u0027my_action\u0027 fails then Mistral will schedule \u0027taskB\u0027 because it\u0027s"},{"line_number":683,"context_line":"   listed in the \u0027on-error\u0027 clause which is processed before the"},{"line_number":684,"context_line":"   \u0027on-complete\u0027 and then will set the state of the workflow to ERROR."},{"line_number":685,"context_line":"   This will prevent from scheduling other new tasks so neither \u0027taskC\u0027 nor"},{"line_number":686,"context_line":"   \u0027taskD\u0027 and \u0027taskE\u0027 will be ever be scheduled. In other words, the whole"},{"line_number":687,"context_line":"   \u0027on-complete\u0027 clause will never be processed because the \u0027fail\u0027 command in"},{"line_number":688,"context_line":"   the \u0027on-success\u0027 sets the workflow state to ERROR."},{"line_number":689,"context_line":"-  If \u0027my_action\u0027 succeeds then the \u0027on-error\u0027 clause will be ignored and since"},{"line_number":690,"context_line":"   \u0027on-success\u0027 is not defined then Mistral will process the \u0027on-complete\u0027"},{"line_number":691,"context_line":"   clause. And while doing that, it will schedule \u0027taskD\u0027 first and then pause"},{"line_number":692,"context_line":"   the workflow because of the \u0027pause\u0027 command. \u0027taskE\u0027 will be scheduled if"},{"line_number":693,"context_line":"   this workflow is resumed manually at some later time through the API."},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"This illustrates that, while designing a workflow, it\u0027s important to know"},{"line_number":696,"context_line":"precisely how Mistral processes \u0027on-success\u0027, \u0027on-error\u0027 and \u0027on-complete\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_f811ca05","line":693,"range":{"start_line":660,"start_character":0,"end_line":693,"end_character":72},"updated":"2018-02-19 21:14:04.000000000","message":"I still feel like this is a reiteration of the explanation that can be prevented by building the knowledge from level to level: on-* words and their clause lists, transition expressions, engine commands. But I can live with that if others don\u0027t complain.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"a9795921b825852eec82687816f053c7ad6cd88e","unresolved":false,"context_lines":[{"line_number":657,"context_line":"schedule ``taskB`` because in the \u0027on-complete\u0027 list it goes right after the"},{"line_number":658,"context_line":"``pause`` command."},{"line_number":659,"context_line":""},{"line_number":660,"context_line":"Given the order in which Mistral processes \u0027on-success\u0027 (or \u0027on-error\u0027) and"},{"line_number":661,"context_line":"\u0027on-complete\u0027 clauses it\u0027s important to understand what will happen if both"},{"line_number":662,"context_line":"clauses have engine commands listed in them."},{"line_number":663,"context_line":""},{"line_number":664,"context_line":".. code-block:: mistral"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"    taskA:"},{"line_number":667,"context_line":"     action: my_action"},{"line_number":668,"context_line":"     on-error:"},{"line_number":669,"context_line":"       - taskB"},{"line_number":670,"context_line":"       - fail"},{"line_number":671,"context_line":"       - taskC"},{"line_number":672,"context_line":"     on-complete:"},{"line_number":673,"context_line":"       - taskD"},{"line_number":674,"context_line":"       - pause"},{"line_number":675,"context_line":"       - taskE"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"As was explained above, \u0027on-complete\u0027 is always processed after \u0027on-success\u0027"},{"line_number":678,"context_line":"(or \u0027on-error\u0027) because it plays the similar role as \u0027finally\u0027 in most general"},{"line_number":679,"context_line":"purpose programming languages. Let\u0027s consider two scenarios that can happen"},{"line_number":680,"context_line":"in the example above when \u0027taskA\u0027 runs, i.e. its action \u0027my_action\u0027 runs."},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"-  If \u0027my_action\u0027 fails then Mistral will schedule \u0027taskB\u0027 because it\u0027s"},{"line_number":683,"context_line":"   listed in the \u0027on-error\u0027 clause which is processed before the"},{"line_number":684,"context_line":"   \u0027on-complete\u0027 and then will set the state of the workflow to ERROR."},{"line_number":685,"context_line":"   This will prevent from scheduling other new tasks so neither \u0027taskC\u0027 nor"},{"line_number":686,"context_line":"   \u0027taskD\u0027 and \u0027taskE\u0027 will be ever be scheduled. In other words, the whole"},{"line_number":687,"context_line":"   \u0027on-complete\u0027 clause will never be processed because the \u0027fail\u0027 command in"},{"line_number":688,"context_line":"   the \u0027on-success\u0027 sets the workflow state to ERROR."},{"line_number":689,"context_line":"-  If \u0027my_action\u0027 succeeds then the \u0027on-error\u0027 clause will be ignored and since"},{"line_number":690,"context_line":"   \u0027on-success\u0027 is not defined then Mistral will process the \u0027on-complete\u0027"},{"line_number":691,"context_line":"   clause. And while doing that, it will schedule \u0027taskD\u0027 first and then pause"},{"line_number":692,"context_line":"   the workflow because of the \u0027pause\u0027 command. \u0027taskE\u0027 will be scheduled if"},{"line_number":693,"context_line":"   this workflow is resumed manually at some later time through the API."},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"This illustrates that, while designing a workflow, it\u0027s important to know"},{"line_number":696,"context_line":"precisely how Mistral processes \u0027on-success\u0027, \u0027on-error\u0027 and \u0027on-complete\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_e76902f8","line":693,"range":{"start_line":660,"start_character":0,"end_line":693,"end_character":72},"in_reply_to":"3fa0c359_be56c305","updated":"2018-02-21 09:35:03.000000000","message":"Ok, let\u0027s include this here. It\u0027s a really good addition and keep the reordering to the time when the refactoring happens.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"26a27e575873187752a85f00a949a56ea1423ef9","unresolved":false,"context_lines":[{"line_number":657,"context_line":"schedule ``taskB`` because in the \u0027on-complete\u0027 list it goes right after the"},{"line_number":658,"context_line":"``pause`` command."},{"line_number":659,"context_line":""},{"line_number":660,"context_line":"Given the order in which Mistral processes \u0027on-success\u0027 (or \u0027on-error\u0027) and"},{"line_number":661,"context_line":"\u0027on-complete\u0027 clauses it\u0027s important to understand what will happen if both"},{"line_number":662,"context_line":"clauses have engine commands listed in them."},{"line_number":663,"context_line":""},{"line_number":664,"context_line":".. code-block:: mistral"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"    taskA:"},{"line_number":667,"context_line":"     action: my_action"},{"line_number":668,"context_line":"     on-error:"},{"line_number":669,"context_line":"       - taskB"},{"line_number":670,"context_line":"       - fail"},{"line_number":671,"context_line":"       - taskC"},{"line_number":672,"context_line":"     on-complete:"},{"line_number":673,"context_line":"       - taskD"},{"line_number":674,"context_line":"       - pause"},{"line_number":675,"context_line":"       - taskE"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":"As was explained above, \u0027on-complete\u0027 is always processed after \u0027on-success\u0027"},{"line_number":678,"context_line":"(or \u0027on-error\u0027) because it plays the similar role as \u0027finally\u0027 in most general"},{"line_number":679,"context_line":"purpose programming languages. Let\u0027s consider two scenarios that can happen"},{"line_number":680,"context_line":"in the example above when \u0027taskA\u0027 runs, i.e. its action \u0027my_action\u0027 runs."},{"line_number":681,"context_line":""},{"line_number":682,"context_line":"-  If \u0027my_action\u0027 fails then Mistral will schedule \u0027taskB\u0027 because it\u0027s"},{"line_number":683,"context_line":"   listed in the \u0027on-error\u0027 clause which is processed before the"},{"line_number":684,"context_line":"   \u0027on-complete\u0027 and then will set the state of the workflow to ERROR."},{"line_number":685,"context_line":"   This will prevent from scheduling other new tasks so neither \u0027taskC\u0027 nor"},{"line_number":686,"context_line":"   \u0027taskD\u0027 and \u0027taskE\u0027 will be ever be scheduled. In other words, the whole"},{"line_number":687,"context_line":"   \u0027on-complete\u0027 clause will never be processed because the \u0027fail\u0027 command in"},{"line_number":688,"context_line":"   the \u0027on-success\u0027 sets the workflow state to ERROR."},{"line_number":689,"context_line":"-  If \u0027my_action\u0027 succeeds then the \u0027on-error\u0027 clause will be ignored and since"},{"line_number":690,"context_line":"   \u0027on-success\u0027 is not defined then Mistral will process the \u0027on-complete\u0027"},{"line_number":691,"context_line":"   clause. And while doing that, it will schedule \u0027taskD\u0027 first and then pause"},{"line_number":692,"context_line":"   the workflow because of the \u0027pause\u0027 command. \u0027taskE\u0027 will be scheduled if"},{"line_number":693,"context_line":"   this workflow is resumed manually at some later time through the API."},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"This illustrates that, while designing a workflow, it\u0027s important to know"},{"line_number":696,"context_line":"precisely how Mistral processes \u0027on-success\u0027, \u0027on-error\u0027 and \u0027on-complete\u0027"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3fa0c359_be56c305","line":693,"range":{"start_line":660,"start_character":0,"end_line":693,"end_character":72},"in_reply_to":"3fa0c359_f811ca05","updated":"2018-02-20 08:33:46.000000000","message":"The reason I inserted it here is because when we explain on-* clauses we don\u0027t yet know about engine commands, we only know about tasks. Then we explain what engine commands do and once it\u0027s fully clear what can be in those clauses I make the emphasis on what can happen if we have many on-* in combination with commands and tasks. Not sure why you\u0027re so confused with this.","commit_id":"4086f63df263cd19cfbc3e12d72d1065c7b71cf1"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"a50b87b1b56a45904563a6e02c7c9ea80790bc8e","unresolved":false,"context_lines":[{"line_number":170,"context_line":"Task is what a workflow consists of. It defines a specific computational"},{"line_number":171,"context_line":"step in the workflow. When the workflow engine processes entities described"},{"line_number":172,"context_line":"in the workflow text written in YAML it schedules tasks for execution."},{"line_number":173,"context_line":"Scheduling a task means that it\u0027s now eligible for execution and will be run"},{"line_number":174,"context_line":"some time later. When exactly it will run depends on the system load and"},{"line_number":175,"context_line":"configuration. Each task can optionally take input data and produce output."},{"line_number":176,"context_line":"In Mistral Workflow Language v2, task can be associated with an action or a"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3fa0c359_274daa99","line":173,"range":{"start_line":173,"start_character":0,"end_line":173,"end_character":17},"updated":"2018-02-21 09:36:47.000000000","message":"Would be good to emphasize.","commit_id":"7423a58365c1c708f2231bfc7e4371bd220e75e5"}]}
