<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi,<div><br></div><div>This is an additional email to continue discussion about new Mistral DSL capabilities. This time about conditional transitions and task dependencies. Here’s the link to the corresponding etherpad: <a href="https://etherpad.openstack.org/p/mistral-poc">https://etherpad.openstack.org/p/mistral-poc</a>.</div><div><br></div><div>For convenience, I’m providing the snippet about conditional transitions right in this message.</div><div><br></div><div>"</div><div><div id="magicdomid1223" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><h1 style="margin: 0px; padding: 0px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; line-height: 1.5em; background-color: rgb(199, 255, 143);">Conditional Transitions</span></h1></div><div id="magicdomid1224" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid496" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><h2 style="margin: 0px; padding: 0px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; line-height: 1.5em; background-color: rgb(199, 255, 143);">Option #1 ('requires' with condition)</span></h2></div><div id="magicdomid586" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">In this case we add additional optional condition in dependencies declaration.</span></div><div id="magicdomid497" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid62" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">    task1 # task1 doesn't have dependencies</span></div><div id="magicdomid63" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      action: MyRest:action1</span></div><div id="magicdomid64" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid65" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">    task2:</span></div><div id="magicdomid2827" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      requires: task1              # task2 is allowed to run if task1 has finished with success</span></div><div id="magicdomid67" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      action: MyRest:action2</span></div><div id="magicdomid68" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid69" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      task3:</span></div><div id="magicdomid2824" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        requires:                         # task3 is allowed to run if task1 and task2 have finished and corresponding conditions are true</span></div><div id="magicdomid2816" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">            task1: $.value1 = 34</span></div><div id="magicdomid2496" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">            task2: $.value2 = 245</span></div><div id="magicdomid2541" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        </span></div><div id="magicdomid74" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        action: MyRest:action3</span></div><div id="magicdomid75" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid76" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">    task4:</span></div><div id="magicdomid2828" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        requires: [task2, task3]      # task4 is allowed to run if task2 and task3 has finished with success</span></div><div id="magicdomid437" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        action: MyRest:action4</span></div><div id="magicdomid438" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid2640" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><h2 style="margin: 0px; padding: 0px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; line-height: 1.5em; background-color: rgb(199, 255, 143);">Option #2 (direct transition)</span></h2></div><div id="magicdomid657" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">In this case after task completion we decided what to do next depending on task result.</span></div><div id="magicdomid594" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid82" class="" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">    task1:</span></div><div id="magicdomid447" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      action: MyRest:action1</span></div><div id="magicdomid2681" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      SUCCESS:</span></div><div id="magicdomid2848" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><ul class="list-indent1" style="margin: 0px 0px 0px 1.5em; padding: 0px; list-style-type: none;"><li style="margin: 0px; padding: 0px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">  - task2       # If task1 has finished with success then start task2</span></li></ul></div><div id="magicdomid2856" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><ul class="list-indent1" style="margin: 0px 0px 0px 1.5em; padding: 0px; list-style-type: none;"><li style="margin: 0px; padding: 0px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">  - task3: $.value1 == 123      # If after completion of task1 variable "value1" in the context equals to "123" then start task3</span></li></ul></div><div id="magicdomid2733" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><ul class="list-indent1" style="margin: 0px 0px 0px 1.5em; padding: 0px; list-style-type: none;"><li style="margin: 0px; padding: 0px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);"> ERROR:</span></li></ul></div><div id="magicdomid2879" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        - task10       # If task1 has finished with error then start task10</span></div><div id="magicdomid2744" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid2643" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><h2 style="margin: 0px; padding: 0px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; line-height: 1.5em; background-color: rgb(199, 255, 143);">Option #3 (hybrid of 'requires' and direct transitions)</span></h2></div><div id="magicdomid2665" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">In this case we can specify both "requires" and direct transitions. In the example below task3 starts only when task1 and task2 have finished. Therefore task2 is an implicit dependency of task3 since task1 initiated execution of task2. It means that a task can start only if the entire sub-workflow initiated by "requires" clause has finished.</span></div><div id="magicdomid780" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid793" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">    task1:</span></div><div id="magicdomid2801" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      action: MyRest:action1</span></div><div id="magicdomid2798" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      SUCCESS</span></div><div id="magicdomid2815" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        - task2</span></div><div id="magicdomid869" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid871" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">    task2:</span></div><div id="magicdomid889" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        action: MyRest:action2</span></div><div id="magicdomid308" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><br style="margin: 0px; padding: 0px;"></div><div id="magicdomid336" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">    task3:</span></div><div id="magicdomid436" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      action: MyRest:action3</span></div><div id="magicdomid2499" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      requires: </span></div><div id="magicdomid2545" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        task1: $.value1 = 34</span></div><div id="magicdomid2867" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">      SUCCESS:</span></div><div id="magicdomid2878" class="ace-line" style="margin: 0px; padding: 0px 1px 0px 0px; font-family: Arial, sans-serif; line-height: 16px;"><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">        task4: '$.value1 == 123'</span></div></div><div><span class="author-a-s42fwotz72zwz66zz89zhxz70zqt" style="margin: 0px; padding: 1px 0px; cursor: auto; background-color: rgb(199, 255, 143);">"</span></div><div><br></div><div>Note that we’re now considering 3 options to proceed with and our current preference is option #3 (mix of ‘requires’ and direct transitions) since it would give a lot of flexibility for designing real life workflows. In some cases it would be more convenient to describe a business process using task dependencies and in other cases use direct conditional transitions if “straightforward” flow definition is preferred.</div><div><br></div><div>Regardless of the option described here a user would start new workflow execution with specifying a particular task in a graph.</div><div><br></div><div>As always, we would like to get your feedback on this.</div><div><br></div><div>Thanks!</div><div><br><div>
<div>Renat Akhmerov</div><div>@ Mirantis Inc.</div><div><br></div><br class="Apple-interchange-newline">

</div>
<br></div></body></html>