Prevent workflow next state

I think the hook you want is on_update and/or on_update_after_submit: