One of our internal ALM specialists was asking for a sample on Associating a State Transition with an Action.  While documentation does have some great information on things like Automating State Transitions there wasn't any samples. Turns out one of the devloperss Naren Datha had already written a sample on this exact topic.

Defining custom actions for state transitions