<div dir="ltr"><div><br></div><div><p style="margin:0in"><font face="verdana, sans-serif">I want to continue the discussion on the workflow "resume" feature.</font></p><p style="margin:0in"><font face="verdana, sans-serif"><br></font></p><p style="margin:0in"><font face="verdana, sans-serif">Resuming from our last conversation @ </font><a href="http://lists.openstack.org/pipermail/openstack-dev/2015-March/060265.html">http://lists.openstack.org/pipermail/openstack-dev/2015-March/060265.html</a><span style="font-family:verdana,sans-serif">. I don't think we should limit how users resume. There may be different possible scenarios. User can fix the environment or condition that led to the failure of the
current task and the user wants to just re-run the failed task. 
Or user can actually fix the environment/condition which include fixing what the task was doing, then just want to continue the next set of task(s).</span></p><p style="margin:0in"><font face="verdana, sans-serif"><br></font></p><p style="margin:0in"><font face="verdana, sans-serif">The following is a list of proposed changes.</font></p><p style="margin:0in"><font face="verdana, sans-serif"><br></font></p><ol type="1" style="margin-left:0.375in;margin-top:0in;margin-bottom:0in"><li><font face="verdana, sans-serif">A new CLI operation to resume
     WF (i.e. mistral workflow-resume).</font></li><ol type="a" style="margin-left:0.375in;margin-top:0in;margin-bottom:0in"><li><font face="verdana, sans-serif">If no additional
      info is provided, assume this WF is manually paused and there are no
      task/action execution errors. The WF state is updated to RUNNING. Update
      using the put method @ ExecutionsController. The put method checks that
      there's no task/action execution errors.</font></li><li><font face="verdana, sans-serif">If WF is in an error state</font></li><ol type="i" style="margin-left:0.375in;margin-top:0in;margin-bottom:0in"><li><font face="verdana, sans-serif">To resume from
       failed task, the workflow-resume command requires the WF execution ID,
       task name, and/or task input.</font></li>
   <li style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">To resume from failed
       with-items task</font></li>
   <ol type="1" style="margin-left:0.375in;margin-top:0in;margin-bottom:0in">
    <li value="1" style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Re-run the
        entire task (re-run all items) requires WF execution ID, task name
        and/or task input.</font></li>
    <li style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Re-run a single item
        requires WF execution ID, task name, with-items index, and/or task
        input for the item.</font></li>
    <li style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Re-run selected items
        requires WF execution ID, task name, with-items indices, and/or task
        input for each items.</font></li>
   </ol>
   <li style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">To resume from the next
       task(s), the workflow-resume command requires the WF execution ID,
       failed task name, output for the failed task, and a flag to skip the
       failed task.</font></li>
  </ol>
 </ol>
</ol>

<p style="margin:0in 0in 0in 0.375in"><font face="verdana, sans-serif"> </font></p>

<ol type="1" style="margin-left:0.375in;direction:ltr;margin-top:0in;margin-bottom:0in">
 <li value="2" style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Make ERROR -> RUNNING as
     valid state transition @ is_valid_transition function.</font></li>
</ol>

<p style="margin:0in 0in 0in 0.375in"><font face="verdana, sans-serif"> </font></p>

<ol type="1" style="margin-left:0.375in;direction:ltr;margin-top:0in;margin-bottom:0in">
 <li value="3" style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Add a comments field to
     Execution model. Add a note that indicates the execution is launched by
     workflow-resume. Auto-populated in this case.</font></li>
</ol>

<p style="margin:0in 0in 0in 0.375in"><font face="verdana, sans-serif"> </font></p>

<ol type="1" style="margin-left:0.375in;direction:ltr;margin-top:0in;margin-bottom:0in">
 <li value="4" style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Resume from failed task. </font></li>
 <ol type="a" style="margin-left:0.375in;direction:ltr;margin-top:0in;margin-bottom:0in">
  <li value="1" style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Re-run task with
      the same task inputs >> POST new action execution for the task
      execution @ ActionExecutionsController </font></li>
  <li style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Re-run task with different
      task inputs >> POST new action execution for the task execution,
      allowed for different input @ ActionExecutionsController</font></li>
 </ol>
</ol>

<p style="margin:0in 0in 0in 0.75in"><font face="verdana, sans-serif"> </font></p>

<ol type="1" style="margin-left:0.375in;direction:ltr;margin-top:0in;margin-bottom:0in">
 <li value="5" style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Resume from next task(s).</font></li>
 <ol type="a" style="margin-left:0.375in;direction:ltr;margin-top:0in;margin-bottom:0in">
  <li value="1" style="margin-top:0px;margin-bottom:0px;vertical-align:middle"><font face="verdana, sans-serif">Inject a noop
      task execution or noop action execution (undecided yet) for the failed task with appropriate output.  The spec is an adhoc spec that
      copies conditions from the failed task. This provides some audit
      functionality and should trigger the next set of task executions (in case
      of branching and such). </font></li>
 </ol>
</ol>

</div></div>