Service contracts between digital providers and consumers should be: (i) understood and verified by the business stakeholders, (ii) mechanically checked for consistency and (iii) automatically mapped to system implementations. This presentation sketches guidelines and templates for expressing service contract clauses as business rules, i.e. logical formulations in constrained natural language conforming to the OMG Semantics of Business Vocabulary and Business Rules (SBVR) specification.
When supported by the SBVR abstract notation, natural language business rules can be mechanically checked for consistency, and eventually processed for automated generation of technical model elements, machine-readable components, executable code and tests. The service contract clauses are established through a method that is inspired by the Design by contract™ approach: the signature of the service operation is expressed by means of a set of business vocabulary entries and its pre/post-conditions are stated as operative business rules. The method and the corresponding rule templates are included in a methodological framework for model driven engineering of services architectures (simpleSOA™), in which the service contract, as a bundle of rights and duties for service providers and consumers, is represented by a layered collection of formal models that work as a body of requirements for implementations. In this model-driven framework, the service contract vocabulary and rule-book constitute the service Computation Independent Model (CIM). We introduce the method guidelines and templates through an example and discuss the assumptions on the resulting conceptual model as well as some recommendations on the contract building enterprise.