Complex business workflows are becoming an integral part of day-to-day business activities. As companies merge or embark in collaborations, there is a need to analyze, update, and integrate existing workflow specifications and run-time applications, to generate new ones that conform to specific target requirements and constraints. We propose a Software Engineering framework and its associated algorithms to compute the optimal composition of target workflows from constituent ones. First, we present a mechanism to compose services from constituent workflows to form a new target workflow. Second, since the composition process may entail the compliance to certain compositional, structural, or behavioral constraints we present a quantitative technique that is based on tolerance thresholds similar to those used in constraint satisfaction problems to restrict the number of constraints violated during the composition process. Finally, we provide an algorithm to compute the optimal composition of workflows with respect to a target workflow. Evaluation results by applying the technique to sample workflows are also presented.