workflow monitoring with threads