state machine with extension points for customizable pre/post transition actions