Change gen_fsm state to a function in a different module
问题 We have a fairly large USSD application that uses Erlang's gen_fsm module to manage the menu options. The current version has a single menus_fsm.erl file that contains 5000+ lines gen_fsm related code. Our next version gives us an opportunity to split menus_fsm.erl into separate files to make it more maintainable in the future. In the old version, to display the help menu we do the following ( help_menu/1 gets called from code not shown that displays the main menu): -module(menus_fsm). %