Add support for changing workflow states.
Merge branch 'jone-workflow'