workflow in the database