The ability to automatically compose Web Services is critical for realising more complex functionalities. Several proposals to use automated planning to deal with the problem of service composition have been recently proposed. We present an approach, based on modelling the problem as a CSP (Constraint Satisfaction Problem), that accommodates for the use of numeric variables, sensing and incomplete knowledge. We introduce a language for expressing extended goals, equipped with temporal constructs, maintainability properties, and an explicit distinction between sensing and achievement goals, in order to avoid undesirable situations.