Service-based systems have many applications, such as collaborative research and development, e-business, health care, military applications and homeland security. In these systems, it is necessary to provide users the capability of composing appropriate services into workflows offering higher-level functionality based on declaratively specified goals. In a large-scale and dynamic service-oriented computing environment, it is desirable that the service composition is automated and situation-aware so that robust and adaptive workflows can be generated. However, existing languages for web services are not expressive enough to model services with situation awareness (SAW) and side effects. This chapter presents an approach to rapid development of adaptable situation-aware service-based systems. This approach is based on the a-logic and a-calculus, and a declarative model for SAW. This approach consists of four major components: (1) analyzing SAW requirements using our declarative model for SAW, (2) translating the model representation to a-logic specifications and specifying a control flow graph in a-logic as the goal for situation-aware service composition., (3) automated synthesis of a-calculus terms that define situation-aware workflow agents for situation-aware service composition, and (4) compilation of a-calculus terms to executable components on an agent platform. An example of applying our framework in developing a distributed control system for intelligently and reliably managing a power grid is given.