A Model of Dynamic Resource Allocation in Workflow Systems