Resource Modeling and Analysis for Workflows: A Petri Net Approach