Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

three-phase workflow for jobs (pre post conditions)

#228

Add Workflow prepare/finish phases

A Workflow should change to have 3 "phases":

  1. prepare
  2. run
  3. finish

The current "workflow/sequence" will be the "run" phase.

The behavior when executing a job/workflow will be as follows:

  1. Execute the "prepare" phase, on the server node only.
    • if this phase exits without a successful result (non-zero exit value) then:
      • The entire Job finishes with the result state: "prepare-not-successful"
    • Otherwise, continue to the next phase.
  2. Execute the "run" phase, as the workflow currently executes dispatched across nodes.
    • retain the execution result of this phase for input to the next phase
    • continue to the next phase
  3. Execute the "finish" phase, on the server node only. It allows a new expansion token "run.result" containing either 0 (success) or non-zero (failure) result of phase 2.
    • if this phase exits successfully, then the Job result status is set to the result status of phase 2
    • if this phase exits non-zero (failed), then Job result status is set to: "finish-not-successful"

document definitions

the xml/yaml formats would have to be changed to support the 2 new phases. currently they have:

xml: <command.../>...
yaml:

 sequence: 
     (metadata)
     commands: 
        - item1...

For XML: add subsections to the <sequence>, and migrate the existing <command> elements into a <run> element...

<sequence ... >
    <prepare>
        <command .../>
        <command .../>
    </prepare>
    <run>
        <command .../>
        <command .../>
    </run>
    <finish>
        <command .../>
        <command .../>
    </finish>
</sequence>

For YAML: replace the "commands:" section with "run:" and add "prepare:" and "finish: " sections:

sequence: 
         (metadata)
         prepare:
            - item1 ..
            - item2...
         run: 
            - item1...
            - item2...
         finish:
            - item1...
            - item2...

GUI

The web GUI for Job edit/create will have to change to support the new phases. The GUI should indicate their semantics with text, and reinforce their place as secondary to the main workflow sequence for basic use cases.

By default for a new Job the Prepare/Finish would be shown as secondary to the Run phase, perhaps with some kind of disclosure button to show the full section if they are empty. Otherwise the GUI widgets would be the same as for current workflow editor.

workflow:

keepgoing: False
Strategy: Node-oriented

Prepare phase: [+] Click to add. *All items must succeed for the workflow to continue*

Run: *Main workflow steps*
    1. ...
    2. ...

Finish: [+] Click to add. *Allows verification of Run results*

Reported by Greg Schueler · March 11th, 2011 @ 03:32 PM

State: new
Milestone: none
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Alex-SF
    Alex-SF
    • Milestone cleared.
    • Milestone order changed from 3 to 0

    April 19th, 2011 @ 01:29 PM

  2. Alex-SF
    Alex-SF
    • Title changed from three-phase workflow for jobs to three-phase workflow for jobs (pre post conditions)

    May 26th, 2011 @ 01:49 PM

  3. Alex-SF
    Alex-SF
    • Milestone cleared.

    May 26th, 2011 @ 01:49 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.