Convert subscription to gen_fsm.