refactored AtomicFSM.onTransition from overridable method to method parameter