Skip to content

Instantly share code, notes, and snippets.

@gregarndt
Created March 2, 2016 15:42
Show Gist options
  • Save gregarndt/1227ca15b1329018b640 to your computer and use it in GitHub Desktop.
Save gregarndt/1227ca15b1329018b640 to your computer and use it in GitHub Desktop.
generic life cycle
* Steps are calls to other things to do stuff. Steps cannot be called in parallel
* Each phase relies on the output from the previous phase
* Cancellations can happen at any time during the phases from something external
* I think that an abort at any phase should drop down to Stop and continue on
* Stop and Finish phases should clean up things created in previous phases
** If Stop/Finish run without one of the previous phases running, then it should
not panic if that resource is not available to clean up
Phases:
Prepare
Step1()
Step2()
Build
Step3()
Run
Step4()
Step5()
Stop
Step6()
Finish
// These steps would be clean up and finalization of previous phases
Step7()
Step8()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment