Workflow analysis is indispensable to capture modeling errors in workflow designs. While in the past several analysis approaches for workflows have been defined, these approaches do not give precise feedback, making it hard for a designer to pinpoint the exact cause of modeling errors. In this paper we introduce a novel approach for analyzing and diagnosing workflows based on integer programming (IP). Each workflow model is translated into a set of IP constraints. Faulty control flow connectors can be easily detected using the approach by relaxing the corresponding constraints. We show that this approach is correct, and illustrate it with realistic examples where the CPLEX tool is used to solve the IP formulations. Moreover, the approach is flexible and can be extended to handle a variety of new constraints, as well as to support new workflow patterns. Its features complement those of existing approaches