Mining and Reasoning on Workflows