const machine = Machine({ id: 'companyOperatingStatus', initial: 'establishing', states: { establishing: { on: { CANCEL: 'not_simpany_customer', ESTABLISHED: 'operating', }, }, not_simpany_customer: { on: { PAY_DEPOSIT: 'establishing', }, }, operating: { on: { STOP: 'stopped', LEAVE: 'left', ANNUL: 'annulled', }, }, stopped: { on: { REOPERATE: 'operating', }, }, left: { on: { BACK: 'operating', }, }, annulled: { type: 'final', }, } });