The adoption of mechanisms for reusing software in pervasive systems has not yet become standard practice. This is because the use of pre-existing software requires the selection, composition and adaptation of prefabricated software parts, as well as the management of some complex problems such as guaranteeing high levels of efficiency and safety in critical domains. In addition to the wide variety of services, pervasive systems are composed of many networked heterogeneous devices with embedded software. In this work, we promote the safe reuse of services in servicebased systems using two complementary technologies, Service-Oriented Architecture and Software Product Lines. In order to do this, we extend both the service discovery and composition processes defined in the DAMASCo framework, which currently does not deal with the service variability that constitutes pervasive systems. We use feature models to represent the variability and to self-adapt the services during the composition in a safe way taking context changes into consideration. We illustrate our proposal with a case study related to the driving domain of an Intelligent Transportation System, handling the context information of the environment.
In this work, we present the integration process of the feature models (FM) into DAMASCo to deal with the services’ variability in the composition. Firstly, in addition to the BPEL/WF descriptions, we have a FM for each service describing its variability. Then, each business process corresponds with a valid configuration of the FM that represents it. We focus on the representation of the service variability wrt the context. After a client executes a request, both the DAMASCo model transformation and the semantic-based service discovery process are activated. Due to the high variability of the services, it is possible that a small variation of a service could be needed. Then, a new process using FM is added to the DAMASCo framework, called service family discovery, to find a new matching as regards a certain context. A new valid configuration of that family containing this feature, representing the particular services, is automatically created, and the new service self-adaptation process added to DAMASCo is executed. Then, the CA-STS corresponding with this FM configuration is automatically created. Finally, this CA-STS interface is transformed into a WF/BPEL, composed with the services to satisfy the request.