# A Rule-Based Language and Verification Framework of Dynamic Service Composition
## 2 A State of the Art on Ruled Based Specification of Service Composition  
Traditional languages proposed for specifying web services composition are process-based hence their imperative character on the one hand. On the other hand, they are very related to the underlying technology. Languages that are standards such as BPEL [10], BPML [11], WS-CDL [12] or WSCI [13] propose to define composite services in the form of structured blocks thus making their flexibility and adaptation difficult. Several other languages and tools have been proposed based on these standardized languages to improve their flexibility [1; 2; 14]. The other disadvantage of these languages is that the processes are centralized and difficult to modify during execution. Moreover, the composite services are describedby WSDL [15] interfaces therefore the orchestration of other types of services that are not compliant with WSDL is not possible. The level of abstraction of the specification of the composition is quite low. To overcome these difficulties, some languages propose increasing the autonomy of the peers and effective distribution [16; 17]. They also present the semantics of the composition by offering the possibility of describing and reasoning about the services during the execution [18; 19]. These languages based on semantics are excellent to discover, select and automatically compose services. However, their flexibility is limited to search the missing services or to build a composition plan based on the query of user and a predefined planning system. It is difficult to add new requirements to a specification of composite service when it is executed. Instead, the rules paradigm has been presented as a declarative approach. It presents the following advantages [7; 20; 21]:  
* Flexibility: compositions based on rules are more flexible than BPML-type compositions. It is able to pursue other execution paths in case where a particular execution path fails without to redefine the composite and redeploy it;
* Adaptability: given the declarative nature of the rule-based service compositions, they can be update to adapt to specific situations, for example in terms of external services or platform deployment;
* Reusability: Since rules are isolated from the context of the business process, they can be reused more easily in other service application contexts;
* Formal semantics: languages based on rules exploit a logical and/or mathematics set. Formal approaches allowing reasoning have been proposed [22; 23; 24] but all use the WS-BPEL process type for their implementation. Considerable efforts have been invested in providing the rule engines to support flexible and adaptable service compositions. In [4; 25], a service-oriented rule engine was introduced, allowing access to business rules by invoking the RuleML engines. [23] introduces an alternative service execution environment in which rules can be defined and then injected into WSDL specifications, after which they can be deployed to a service executor. Reference [26] defines in the form of clauses _if.then_, the structure, the data and the constraint rules under the basis of elements such as Message, Event, Condition, Provider, Flow, Role, and Activity. This is a first step for the flexible composite service specification but it is presented as an extension of the BPEL notations. To separate the business rules from the BPEL code, [PERSON] et al. suggested an aspect-based style (AO4 BPEL) [27]. Reference [7] argues that business rules can be used in a service composition without the need for a BPEL framework. This increases the adaptability of the orchestration. At the deployment level, a \(CA\) (Condition-Action) rule engine supports rules-based service composition. To obtain the composite, an analysis of the registry (containing WSDLs) of the services is performed in order to extract the dependencies between services and to build the CA rules. The business rules and the constraints added to the CA rules.