further work on persisting process state to db and resuming process