Update workflow.rst

Removal of redundant "In Python Code" in the "Changing Workflow State Section" and addition of an example of how to change workflow states based on an event (parent folder transition).