add state_machine in task model and add field in database of tasks table