Model very simple state machine

I need to model a workflow to chain some service tasks that are processing an input object and also register the progress of processing in db (sort of a very very simple state machine…). Could you please tell what are the best practices to model this? Is it ok to have task end execution listeners or should it be part of each task responsibility to update the status?
Thank you!