SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
Service contract clauses as
           business rules™

                   Fabio De Rosa1, Ariele P. Maesano2, Libero Maesano3
               1 fabio.de-rosa@simple-eng.com - SIMPLE ENGINEERING, Rome, Italy
  2   ariele.maesano@lip6.fr - Laboratoire d’Informatique de Paris 6 UPMC, Paris, France
                           (formerly SIMPLE ENGINEERING, Paris, France)
             3 libero.maesano@simple-eng.com - SIMPLE ENGINEERING, Paris, France




24th International Conference on Software & Systems Engineering and their Applications
                            ICSSEA ‘12 – Paris Oct. 23-25
Table of contents
               Problem statement
               Elements of the solution
               An example: Withdrawal
               Conclusion




ICSSEA ‘12 – Paris Oct. 23-25    De Rosa et al., Service contract clauses as business rules   23/10/12 - 2
Problem statement
           Contract-first Service Oriented Architecture
              Services are not systems – they are activities carried out by systems (providers) that
              bring value to other systems (consumers)
              Each service shall be precisely defined by an artifact - the service contract - that
              must be considered as a bundle of rights and duties by the service parties
              The service contract is the formal model of the service that the parties must agree
              MDA approach: the service model is layered
                  Computation Independent Model (CIM) – declarative model of the service
                   Platform Independent Model (PIM) – abstract computational model of the
   and transformation
   Model mapping




                

                   service – independent from a specific platform (UML/OCL Model)
                  Platform Specific Models (PSMs) – concrete computational models of the service
                   – dependent on the specific platform – halved in two parties
                       Interoperability Platform(s) SM – allowing interoperability of non
                         interoperable implementations (SOAP, REST, …) - included in the service
                         contract
                       Implementation Platform(s) SM – supporting the parties’ implementations
                         (JEE,.NET,…) – outside the service contract
              The service model is not the system model !
ICSSEA ‘12 – Paris Oct. 23-25       De Rosa et al., Service contract clauses as business rules   23/10/12 - 3
Problem statement (II)
       Service model modularity - separation of concerns
          operation model - what the provider does for the consumer (not
          how it does it!)
          interaction model - how the provider and the consumer interact in
          order to coordinate the service invocation, deliberation, delivery (or
          refusal), reporting (conversations – choreographies)
          security model - authentication, authorization, confidentiality,
          integrity, accountability, non repudiation
          performance model – volume, throughput, speed, scalability,
            availability, reliability, integrity, maintainability
       The service operation model is the core contract component – the
         same service operation may be carried out through several different
         interaction, security and performance agreements
       The focus here is on the service operation expression at the CIM level

ICSSEA ‘12 – Paris Oct. 23-25   De Rosa et al., Service contract clauses as business rules   23/10/12 - 4
Problem statement (III)
       Formality vs. understandability
          Computation Independent Model: previously called Business Model
          How to express the service operation in a notation that can be easily
          understood and validated by the business stakeholders
          natural language ?
          How to express the service operation in a formal notation that allows:
            mechanical checking (model checking for properties such as consistency)

            automated transformation towards computational models (model-driven

               engineering)
            automated creation of test cases (model-based testing)

          UML/OCL ?
          Understandability vs. mechanical checking, transformation and automated
          generation are conflicting exigencies:
            Natural language is understandable but it is hard to be mechanically
               checked and automatically transformed
            UML/OCL is formal but not understandable by the business stakeholders –
               it is suitable for the computational model (PMI)
ICSSEA ‘12 – Paris Oct. 23-25   De Rosa et al., Service contract clauses as business rules   23/10/12 - 5
Elements of the solution
       Contract-based design formulation of the service operation
         How to express a service operation in a declarative manner ?
         Design by Contract™ by Bertrand Meyer, that we call ‘contract-
         based design’1, is an approach for designing software that
         prescribes that software designers should define not only syntactic
         interface specifications for software components, but also semantic
         ones that extend the ordinary definition of abstract data types with
         pre-conditions, post-conditions and invariants
         An operation, equipped with a signature, can be precisely defined
         by:
           Its pre-conditions – to be assumed on entry

           Its post-conditions – to be guaranteed on exit

           Its invariants – to be assumed on entry and guaranteed on exit
       1 Design by Contract is a registered trademark of Eiffel Software in the United States - In order to avoid the
       confusion between the general design approach and the specific Eiffel provisions and mechanisms, we will employ
       the generic term ‘contract-based design’
ICSSEA ‘12 – Paris Oct. 23-25           De Rosa et al., Service contract clauses as business rules           23/10/12 - 6
Elements of the solution (II)
       Business rules
          Business rules are all around in the “real” economy, but yet for whatever
          reason they are seldom featured in requirements for the digital economy
          The very first goal of the business rule research field and practice has been
          to give the rules the status of “first class” requirements and to distinguish
          them from other requirement artifacts such as use cases and process
            models
            An essential feature of business rules is understandability
            Controlled natural language - formulation style that
               uses only words from a specified, relatively limited set of words in
                some defined natural language
               uses only specified forms of phrase, from a relatively limited set

            Very important step: release by the OMG of the Semantics of Business
            Vocabulary and Business Rules (SBVR – 2008) - controlled natural
            language becomes formal (equipped with a formal meta-model) !

ICSSEA ‘12 – Paris Oct. 23-25    De Rosa et al., Service contract clauses as business rules   23/10/12 - 7
Elements of the solution (III)
       Semantics of Business Vocabulary and Rules (SBVR)
         SBVR-compliant Business vocabulary
                contains all the specialized terms, names, and fact type forms of
                 concepts that a given organization or community uses in their talking
                 and writing in the course of doing business
                supporting basis for expressing business rules
            SBVR-compliant Business rules
                Criteria for making decisions
                Consistent with formal logics:
                   structural (definitional) rules are alethic claims (necessity)
                   operative (behavioral) rules are deontic claims (obligation)
                Business rules are logical expressions, not CA or ECA rules !
            SBVR does not mandate any particular notation
            Specification includes a recommended proposal for expressing
            business rules with controlled natural English language
ICSSEA ‘12 – Paris Oct. 23-25   De Rosa et al., Service contract clauses as business rules   23/10/12 - 8
An example: Withdrawal
       Writing convention
         terms - that design noun concepts - are underlined (term)
         verbs - that design fact types - are in italics (verb)
         names - that design individual concepts - are doubly underlined and
         with the first letter capitalized (Name)
         keywords - that design quantifiers, logical operators, modal
         operators ... - are in boldface (keyword)
       Bank vocabulary
         the expression of operation clauses on a banking service needs the
         definition of object-type and role entries such as ‘account’,
         ‘balance’, ‘amount’, ‘customer’ and of fact-type entries such as
         ‘customer withdraws amount from account’, ‘account number
         identifies account’, ‘account has state’, ‘account has balance’ …


ICSSEA ‘12 – Paris Oct. 23-25   De Rosa et al., Service contract clauses as business rules   23/10/12 - 9
An example: Withdrawal (II)
            Objectification (crucial formulation device)
         Propositions based on the ternary fact type ‘customer withdraws amount from account’ can be objectified by adding
         to the service vocabulary the noun concept ‘withdrawal’ and additional binary fact types such as ‘customer effects
         withdrawal’, ‘withdrawal involves account’ and ‘withdrawal takes out amount’

         The relationship between the objectified fact type and the objectifying object types and fact types is established
         through a structural rule such as:
         It is necessary that
         each withdrawal that is effected by a customer and that involves an account and that takes out an amount
         is an actuality that the customer withdraws the amount from the account
         An actuality is a state of affairs that happens in the actual world


            Withdrawal operation signature
         Add vocabulary entries such as: ‘withdrawal operation’, ‘argument’, ‘result’, ‘withdrawal operation has argument’,
         ‘withdrawal operation has result’, ‘argument specifies account number’, ‘argument specifies amount’, ‘result specifies
         account number’, ‘result specifies account balance’.
         And a structural rule such as:
         It is necessary that
         each withdrawal operation has exactly one argument that specifies exactly one account number and
         exactly one amount and has exactly one result that specifies exactly one account number and exactly one
         account balance


ICSSEA ‘12 – Paris Oct. 23-25             De Rosa et al., Service contract clauses as business rules              23/10/12 - 10
An example: Withdrawal (III)
       Withdrawal operation pre-condition
            bearing on resources states and operation arguments
            expressed as an operative rule
       It is obligatory that
       if
       a withdrawal operation that has an argument that specifies an account number and that specifies an amount
       handles a withdrawal
       then
       the account that is involved in the withdrawal is identified by the account number immediately before the
       withdrawal occurs
       and the account is in the extension of the concept ‘account’ immediately before the withdrawal occurs
       and the account state of the account equals Active immediately before the withdrawal occurs
       and the balance of the account is greater than the amount immediately before the withdrawal occurs

       The keywords ‘if’ and ‘then’ respectively introduce the antecedent and consequent of a material implication.
       With the fact type ‘state of affairs1 occurs immediately before state of affairs2 occurs’, the SBVR Structured English
       supports objectification by proposing a convenient mechanism that is based on the word ‘occurs’ being in the
       designation of a fact type after a placeholder. An implicit form of a fact type can be used that objectifies a
       propositional expression in the position of the placeholder and leaves out the word ‘occurs’.
       The fact type ‘state of affairs1 occurs immediately before state of affairs2 occurs’ conveys the meaning of the well-
       known Allen’s “X meets Y” relation between the temporal interval X in which the state of affairs1 occurs and the
       temporal interval Y in which the state of affairs2 occurs

ICSSEA ‘12 – Paris Oct. 23-25            De Rosa et al., Service contract clauses as business rules               23/10/12 - 11
An example: Withdrawal (IV)
       Withdrawal operation post-condition
            bearing on resources’ states “immediately after” and operation
            results, and their relationships with resource states “immediately
            before” and operation arguments
            expressed as an operative rule
       It is obligatory that
       if
       a withdrawal operation that has an argument that specifies an account number1 and that specifies an amount
       and that has a result that specifies an account number2 and that specifies a balance1 handles a withdrawal
       then
       the account involved in the withdrawal has a balance2 immediately after the withdrawal occurs
       and the account has a balance3 immediately before the withdrawal occurs
       and the balance2 equals the balance3 minus the amount
       and the account number2 identifies the account immediately after the withdrawal occurs
       and the account is in the extension of the concept ‘account’ immediately after the withdrawal occurs
       and the account number2 equals the account number1
       and the balance1 equals the balance2




ICSSEA ‘12 – Paris Oct. 23-25         De Rosa et al., Service contract clauses as business rules        23/10/12 - 12
An example: Withdrawal (V)
       Withdrawal operation invariant
            bearing on the subsistence of states of the service world that
            shall not change as an effect of the service operation execution
            we consider that they are implicitly asserted (Common Sense
            Law of Inertia)
            there is no need of explicitly stating invariants as “dumb”
            operative business rules such as:
       It is obligatory that
       if
       a withdrawal operation handles a withdrawal
       then
       the account that is involved in the withdrawal and that is in the extension of the concept ‘account’
       immediately before the withdrawal occurs is in the extension of the concept ‘account’ immediately after the
       withdrawal occurs
       and the account number that identifies the account immediately before the withdrawal occurs identifies the
       account immediately after the withdrawal occurs
       and the account state that is of the account immediately before the withdrawal occurs is of the account
       immediately after the withdrawal occurs
       and ...

ICSSEA ‘12 – Paris Oct. 23-25          De Rosa et al., Service contract clauses as business rules           23/10/12 - 13
Meta-requirements
       The service operation must be realized by an activity that comply with the
          (meta-)requirements:
          Accuracy - the activity effects – state changes & service operation results –
          shall satisfy the service operation post-condition rule
          Robustness - the activity can be performed only if the service operation
          pre-condition rule is satisfied
          Atomicity - the activity shall be “all or nothing” and does not show
          intermediate states - only the initial and the final ones are accessible
          Isolation - the activity shall be conducted as the only one that accesses the
          resources that are referred to by the service operation pre/post-condition
          rules
          Durability - the activity effects shall be permanent “all things being equal”
          Integrity - the activity must not produce any “side” effect, i.e. that is not
          explicitly mentioned by the service operation post-condition rule
          Safety – the activity partial or total failure shall not lead to a non-compliant
          state
ICSSEA ‘12 – Paris Oct. 23-25    De Rosa et al., Service contract clauses as business rules   23/10/12 - 14
Conclusion and future work
       Service operation contract-based formulation with SBVR makes real the dream of
           formality and understandability – these conceptual tools can be used now - hand-
           made transformation to UML/OCL (PIM)
           we are working on:
            controlled natural French language
            controlled natural Italian language – within HL7 Italia
       Ongoing and future research programme in the MDA community:
          editing tools and formal checkers that help formulating the vocabulary and the rules
          tools supporting the automatic transformation of the vocabulary and rulebook into
          artifacts based on PIM level notations, such as UML/OCL and eventually OWL
          automatic transformation of elements of the service PIM (UML/OCL, OWL) into the
          interoperability PSM (SOAP, REST platforms) and the implementation PSM (JEE, .NET
          platforms) - this issue has already been broadly investigated in the research field and
          by the authors, and henceforth can be considered an engineering rather than a
          research task
          model-based testing – automated, systematic (checking pre/post conditions,
          unintended side effects …) and purpose-driven generation of test cases from the
          service model (from SBVR – UML/OCL to TTCN-3 ….)
          MIDAS project - www.midas-project.eu
ICSSEA ‘12 – Paris Oct. 23-25     De Rosa et al., Service contract clauses as business rules   23/10/12 - 15
Questions ?
               Thank you for your attention
               More information:
               http://blog.simple-eng.com




ICSSEA ‘12 – Paris Oct. 23-25   De Rosa et al., Service contract clauses as business rules   23/10/12 - 16

Más contenido relacionado

Destacado

MALAYSIAN LEGAL SYSTEM Tutorial 3
MALAYSIAN LEGAL SYSTEM Tutorial 3MALAYSIAN LEGAL SYSTEM Tutorial 3
MALAYSIAN LEGAL SYSTEM Tutorial 3xareejx
 
U.S. Department of Labor - Wage & Hour Division
U.S. Department of Labor - Wage & Hour DivisionU.S. Department of Labor - Wage & Hour Division
U.S. Department of Labor - Wage & Hour Divisionjpeabody
 
Sblo101 june2013finalfor dist
Sblo101 june2013finalfor distSblo101 june2013finalfor dist
Sblo101 june2013finalfor distjpeabody
 
Contract of Service & Contract for Service
Contract of Service & Contract for ServiceContract of Service & Contract for Service
Contract of Service & Contract for ServiceHanif Zulkifli
 
Malaysian legal system
Malaysian legal systemMalaysian legal system
Malaysian legal systemkpmbp
 

Destacado (6)

MALAYSIAN LEGAL SYSTEM Tutorial 3
MALAYSIAN LEGAL SYSTEM Tutorial 3MALAYSIAN LEGAL SYSTEM Tutorial 3
MALAYSIAN LEGAL SYSTEM Tutorial 3
 
U.S. Department of Labor - Wage & Hour Division
U.S. Department of Labor - Wage & Hour DivisionU.S. Department of Labor - Wage & Hour Division
U.S. Department of Labor - Wage & Hour Division
 
Sblo101 june2013finalfor dist
Sblo101 june2013finalfor distSblo101 june2013finalfor dist
Sblo101 june2013finalfor dist
 
Contract of Service & Contract for Service
Contract of Service & Contract for ServiceContract of Service & Contract for Service
Contract of Service & Contract for Service
 
Malaysian legal system
Malaysian legal systemMalaysian legal system
Malaysian legal system
 
Study notes contract law
Study notes   contract lawStudy notes   contract law
Study notes contract law
 

Similar a Service contract clauses as business rules

Migrating SOA
Migrating SOAMigrating SOA
Migrating SOACoi Xay
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented ArchitectureSandeep Ganji
 
Architecting Your Enterprise
Architecting Your EnterpriseArchitecting Your Enterprise
Architecting Your EnterpriseEd Seidewitz
 
Microservices_vs_SOA
Microservices_vs_SOAMicroservices_vs_SOA
Microservices_vs_SOAYakov Liskoff
 
Service Oriented & Model Driven Architectures
Service Oriented & Model Driven ArchitecturesService Oriented & Model Driven Architectures
Service Oriented & Model Driven ArchitecturesPankaj Saharan
 
Contract First Modeling Services Using Uml
Contract First Modeling Services Using UmlContract First Modeling Services Using Uml
Contract First Modeling Services Using UmlRody Middelkoop
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Contextphanleson
 
Lecture 3 - Services
Lecture 3 - ServicesLecture 3 - Services
Lecture 3 - Servicesphanleson
 
Why Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational SoaWhy Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational SoaDavid Linthicum
 
Microsoft BizTalk server seen by the programmer’s eyes
Microsoft BizTalk server seen by the programmer’s eyesMicrosoft BizTalk server seen by the programmer’s eyes
Microsoft BizTalk server seen by the programmer’s eyesSandro Pereira
 
Technology, Software, Architecture for P&C Insurance
Technology, Software, Architecture for P&C InsuranceTechnology, Software, Architecture for P&C Insurance
Technology, Software, Architecture for P&C InsuranceGregg Barrett
 
TOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSES
TOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSESTOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSES
TOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSESIJCSEA Journal
 
Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...
Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...
Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...IJERA Editor
 
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHESWEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHESijwscjournal
 
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHESWEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHESijwscjournal
 
Microsoft Mimarisi
Microsoft MimarisiMicrosoft Mimarisi
Microsoft MimarisiNuri Cankaya
 
service orentation documentation
service orentation documentationservice orentation documentation
service orentation documentationpavan nani
 

Similar a Service contract clauses as business rules (20)

Migrating SOA
Migrating SOAMigrating SOA
Migrating SOA
 
Service Oriented Architecture
Service Oriented ArchitectureService Oriented Architecture
Service Oriented Architecture
 
Architecting Your Enterprise
Architecting Your EnterpriseArchitecting Your Enterprise
Architecting Your Enterprise
 
Microservices_vs_SOA
Microservices_vs_SOAMicroservices_vs_SOA
Microservices_vs_SOA
 
Service Oriented & Model Driven Architectures
Service Oriented & Model Driven ArchitecturesService Oriented & Model Driven Architectures
Service Oriented & Model Driven Architectures
 
EA and SOA
EA and SOAEA and SOA
EA and SOA
 
Contract First Modeling Services Using Uml
Contract First Modeling Services Using UmlContract First Modeling Services Using Uml
Contract First Modeling Services Using Uml
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Context
 
Kz2519141921
Kz2519141921Kz2519141921
Kz2519141921
 
Lecture 3 - Services
Lecture 3 - ServicesLecture 3 - Services
Lecture 3 - Services
 
Why Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational SoaWhy Coordination And Transactions Are Key To Building An Operational Soa
Why Coordination And Transactions Are Key To Building An Operational Soa
 
Microsoft BizTalk server seen by the programmer’s eyes
Microsoft BizTalk server seen by the programmer’s eyesMicrosoft BizTalk server seen by the programmer’s eyes
Microsoft BizTalk server seen by the programmer’s eyes
 
SOA Course - Next Generation
SOA Course - Next GenerationSOA Course - Next Generation
SOA Course - Next Generation
 
Technology, Software, Architecture for P&C Insurance
Technology, Software, Architecture for P&C InsuranceTechnology, Software, Architecture for P&C Insurance
Technology, Software, Architecture for P&C Insurance
 
TOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSES
TOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSESTOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSES
TOWARDS AUTOMATION OF SOA-BASED BUSINESS PROCESSES
 
Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...
Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...
Graph-Based Algorithm for a User-Aware SaaS Approach: Computing Optimal Distr...
 
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHESWEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
 
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHESWEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
WEB PORTAL INTEGRATION ARCHITECTURE APPROACHES
 
Microsoft Mimarisi
Microsoft MimarisiMicrosoft Mimarisi
Microsoft Mimarisi
 
service orentation documentation
service orentation documentationservice orentation documentation
service orentation documentation
 

Más de Libero Maesano

STV-20151019-ServiceFunctionaTestAutomation (2)
STV-20151019-ServiceFunctionaTestAutomation (2)STV-20151019-ServiceFunctionaTestAutomation (2)
STV-20151019-ServiceFunctionaTestAutomation (2)Libero Maesano
 
HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...
HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...
HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...Libero Maesano
 
ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)Libero Maesano
 
Steps towards an industrial implementation of HSSP standards
Steps towards an industrial implementation of HSSP standardsSteps towards an industrial implementation of HSSP standards
Steps towards an industrial implementation of HSSP standardsLibero Maesano
 
SOA Testing As A Service
SOA Testing As A ServiceSOA Testing As A Service
SOA Testing As A ServiceLibero Maesano
 
Steps towards model-based, inference-driven SOA Testing
Steps towards model-based, inference-driven SOA TestingSteps towards model-based, inference-driven SOA Testing
Steps towards model-based, inference-driven SOA TestingLibero Maesano
 

Más de Libero Maesano (6)

STV-20151019-ServiceFunctionaTestAutomation (2)
STV-20151019-ServiceFunctionaTestAutomation (2)STV-20151019-ServiceFunctionaTestAutomation (2)
STV-20151019-ServiceFunctionaTestAutomation (2)
 
HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...
HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...
HSSP-SOA_Forum-HL7IntParisWGM-MLettere_LMaesano-MIDAS-Testing HSSP Services-M...
 
ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)ACM-SAC-2016-Keynote (1)
ACM-SAC-2016-Keynote (1)
 
Steps towards an industrial implementation of HSSP standards
Steps towards an industrial implementation of HSSP standardsSteps towards an industrial implementation of HSSP standards
Steps towards an industrial implementation of HSSP standards
 
SOA Testing As A Service
SOA Testing As A ServiceSOA Testing As A Service
SOA Testing As A Service
 
Steps towards model-based, inference-driven SOA Testing
Steps towards model-based, inference-driven SOA TestingSteps towards model-based, inference-driven SOA Testing
Steps towards model-based, inference-driven SOA Testing
 

Último

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 

Último (20)

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 

Service contract clauses as business rules

  • 1. Service contract clauses as business rules™ Fabio De Rosa1, Ariele P. Maesano2, Libero Maesano3 1 fabio.de-rosa@simple-eng.com - SIMPLE ENGINEERING, Rome, Italy 2 ariele.maesano@lip6.fr - Laboratoire d’Informatique de Paris 6 UPMC, Paris, France (formerly SIMPLE ENGINEERING, Paris, France) 3 libero.maesano@simple-eng.com - SIMPLE ENGINEERING, Paris, France 24th International Conference on Software & Systems Engineering and their Applications ICSSEA ‘12 – Paris Oct. 23-25
  • 2. Table of contents Problem statement Elements of the solution An example: Withdrawal Conclusion ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 2
  • 3. Problem statement Contract-first Service Oriented Architecture Services are not systems – they are activities carried out by systems (providers) that bring value to other systems (consumers) Each service shall be precisely defined by an artifact - the service contract - that must be considered as a bundle of rights and duties by the service parties The service contract is the formal model of the service that the parties must agree MDA approach: the service model is layered  Computation Independent Model (CIM) – declarative model of the service Platform Independent Model (PIM) – abstract computational model of the and transformation Model mapping  service – independent from a specific platform (UML/OCL Model)  Platform Specific Models (PSMs) – concrete computational models of the service – dependent on the specific platform – halved in two parties  Interoperability Platform(s) SM – allowing interoperability of non interoperable implementations (SOAP, REST, …) - included in the service contract  Implementation Platform(s) SM – supporting the parties’ implementations (JEE,.NET,…) – outside the service contract The service model is not the system model ! ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 3
  • 4. Problem statement (II) Service model modularity - separation of concerns operation model - what the provider does for the consumer (not how it does it!) interaction model - how the provider and the consumer interact in order to coordinate the service invocation, deliberation, delivery (or refusal), reporting (conversations – choreographies) security model - authentication, authorization, confidentiality, integrity, accountability, non repudiation performance model – volume, throughput, speed, scalability, availability, reliability, integrity, maintainability The service operation model is the core contract component – the same service operation may be carried out through several different interaction, security and performance agreements The focus here is on the service operation expression at the CIM level ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 4
  • 5. Problem statement (III) Formality vs. understandability Computation Independent Model: previously called Business Model How to express the service operation in a notation that can be easily understood and validated by the business stakeholders natural language ? How to express the service operation in a formal notation that allows:  mechanical checking (model checking for properties such as consistency)  automated transformation towards computational models (model-driven engineering)  automated creation of test cases (model-based testing) UML/OCL ? Understandability vs. mechanical checking, transformation and automated generation are conflicting exigencies:  Natural language is understandable but it is hard to be mechanically checked and automatically transformed  UML/OCL is formal but not understandable by the business stakeholders – it is suitable for the computational model (PMI) ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 5
  • 6. Elements of the solution Contract-based design formulation of the service operation How to express a service operation in a declarative manner ? Design by Contract™ by Bertrand Meyer, that we call ‘contract- based design’1, is an approach for designing software that prescribes that software designers should define not only syntactic interface specifications for software components, but also semantic ones that extend the ordinary definition of abstract data types with pre-conditions, post-conditions and invariants An operation, equipped with a signature, can be precisely defined by:  Its pre-conditions – to be assumed on entry  Its post-conditions – to be guaranteed on exit  Its invariants – to be assumed on entry and guaranteed on exit 1 Design by Contract is a registered trademark of Eiffel Software in the United States - In order to avoid the confusion between the general design approach and the specific Eiffel provisions and mechanisms, we will employ the generic term ‘contract-based design’ ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 6
  • 7. Elements of the solution (II) Business rules Business rules are all around in the “real” economy, but yet for whatever reason they are seldom featured in requirements for the digital economy The very first goal of the business rule research field and practice has been to give the rules the status of “first class” requirements and to distinguish them from other requirement artifacts such as use cases and process models An essential feature of business rules is understandability Controlled natural language - formulation style that  uses only words from a specified, relatively limited set of words in some defined natural language  uses only specified forms of phrase, from a relatively limited set Very important step: release by the OMG of the Semantics of Business Vocabulary and Business Rules (SBVR – 2008) - controlled natural language becomes formal (equipped with a formal meta-model) ! ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 7
  • 8. Elements of the solution (III) Semantics of Business Vocabulary and Rules (SBVR) SBVR-compliant Business vocabulary  contains all the specialized terms, names, and fact type forms of concepts that a given organization or community uses in their talking and writing in the course of doing business  supporting basis for expressing business rules SBVR-compliant Business rules  Criteria for making decisions  Consistent with formal logics:  structural (definitional) rules are alethic claims (necessity)  operative (behavioral) rules are deontic claims (obligation)  Business rules are logical expressions, not CA or ECA rules ! SBVR does not mandate any particular notation Specification includes a recommended proposal for expressing business rules with controlled natural English language ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 8
  • 9. An example: Withdrawal Writing convention terms - that design noun concepts - are underlined (term) verbs - that design fact types - are in italics (verb) names - that design individual concepts - are doubly underlined and with the first letter capitalized (Name) keywords - that design quantifiers, logical operators, modal operators ... - are in boldface (keyword) Bank vocabulary the expression of operation clauses on a banking service needs the definition of object-type and role entries such as ‘account’, ‘balance’, ‘amount’, ‘customer’ and of fact-type entries such as ‘customer withdraws amount from account’, ‘account number identifies account’, ‘account has state’, ‘account has balance’ … ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 9
  • 10. An example: Withdrawal (II) Objectification (crucial formulation device) Propositions based on the ternary fact type ‘customer withdraws amount from account’ can be objectified by adding to the service vocabulary the noun concept ‘withdrawal’ and additional binary fact types such as ‘customer effects withdrawal’, ‘withdrawal involves account’ and ‘withdrawal takes out amount’ The relationship between the objectified fact type and the objectifying object types and fact types is established through a structural rule such as: It is necessary that each withdrawal that is effected by a customer and that involves an account and that takes out an amount is an actuality that the customer withdraws the amount from the account An actuality is a state of affairs that happens in the actual world Withdrawal operation signature Add vocabulary entries such as: ‘withdrawal operation’, ‘argument’, ‘result’, ‘withdrawal operation has argument’, ‘withdrawal operation has result’, ‘argument specifies account number’, ‘argument specifies amount’, ‘result specifies account number’, ‘result specifies account balance’. And a structural rule such as: It is necessary that each withdrawal operation has exactly one argument that specifies exactly one account number and exactly one amount and has exactly one result that specifies exactly one account number and exactly one account balance ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 10
  • 11. An example: Withdrawal (III) Withdrawal operation pre-condition bearing on resources states and operation arguments expressed as an operative rule It is obligatory that if a withdrawal operation that has an argument that specifies an account number and that specifies an amount handles a withdrawal then the account that is involved in the withdrawal is identified by the account number immediately before the withdrawal occurs and the account is in the extension of the concept ‘account’ immediately before the withdrawal occurs and the account state of the account equals Active immediately before the withdrawal occurs and the balance of the account is greater than the amount immediately before the withdrawal occurs The keywords ‘if’ and ‘then’ respectively introduce the antecedent and consequent of a material implication. With the fact type ‘state of affairs1 occurs immediately before state of affairs2 occurs’, the SBVR Structured English supports objectification by proposing a convenient mechanism that is based on the word ‘occurs’ being in the designation of a fact type after a placeholder. An implicit form of a fact type can be used that objectifies a propositional expression in the position of the placeholder and leaves out the word ‘occurs’. The fact type ‘state of affairs1 occurs immediately before state of affairs2 occurs’ conveys the meaning of the well- known Allen’s “X meets Y” relation between the temporal interval X in which the state of affairs1 occurs and the temporal interval Y in which the state of affairs2 occurs ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 11
  • 12. An example: Withdrawal (IV) Withdrawal operation post-condition bearing on resources’ states “immediately after” and operation results, and their relationships with resource states “immediately before” and operation arguments expressed as an operative rule It is obligatory that if a withdrawal operation that has an argument that specifies an account number1 and that specifies an amount and that has a result that specifies an account number2 and that specifies a balance1 handles a withdrawal then the account involved in the withdrawal has a balance2 immediately after the withdrawal occurs and the account has a balance3 immediately before the withdrawal occurs and the balance2 equals the balance3 minus the amount and the account number2 identifies the account immediately after the withdrawal occurs and the account is in the extension of the concept ‘account’ immediately after the withdrawal occurs and the account number2 equals the account number1 and the balance1 equals the balance2 ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 12
  • 13. An example: Withdrawal (V) Withdrawal operation invariant bearing on the subsistence of states of the service world that shall not change as an effect of the service operation execution we consider that they are implicitly asserted (Common Sense Law of Inertia) there is no need of explicitly stating invariants as “dumb” operative business rules such as: It is obligatory that if a withdrawal operation handles a withdrawal then the account that is involved in the withdrawal and that is in the extension of the concept ‘account’ immediately before the withdrawal occurs is in the extension of the concept ‘account’ immediately after the withdrawal occurs and the account number that identifies the account immediately before the withdrawal occurs identifies the account immediately after the withdrawal occurs and the account state that is of the account immediately before the withdrawal occurs is of the account immediately after the withdrawal occurs and ... ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 13
  • 14. Meta-requirements The service operation must be realized by an activity that comply with the (meta-)requirements: Accuracy - the activity effects – state changes & service operation results – shall satisfy the service operation post-condition rule Robustness - the activity can be performed only if the service operation pre-condition rule is satisfied Atomicity - the activity shall be “all or nothing” and does not show intermediate states - only the initial and the final ones are accessible Isolation - the activity shall be conducted as the only one that accesses the resources that are referred to by the service operation pre/post-condition rules Durability - the activity effects shall be permanent “all things being equal” Integrity - the activity must not produce any “side” effect, i.e. that is not explicitly mentioned by the service operation post-condition rule Safety – the activity partial or total failure shall not lead to a non-compliant state ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 14
  • 15. Conclusion and future work Service operation contract-based formulation with SBVR makes real the dream of formality and understandability – these conceptual tools can be used now - hand- made transformation to UML/OCL (PIM) we are working on: controlled natural French language controlled natural Italian language – within HL7 Italia Ongoing and future research programme in the MDA community: editing tools and formal checkers that help formulating the vocabulary and the rules tools supporting the automatic transformation of the vocabulary and rulebook into artifacts based on PIM level notations, such as UML/OCL and eventually OWL automatic transformation of elements of the service PIM (UML/OCL, OWL) into the interoperability PSM (SOAP, REST platforms) and the implementation PSM (JEE, .NET platforms) - this issue has already been broadly investigated in the research field and by the authors, and henceforth can be considered an engineering rather than a research task model-based testing – automated, systematic (checking pre/post conditions, unintended side effects …) and purpose-driven generation of test cases from the service model (from SBVR – UML/OCL to TTCN-3 ….) MIDAS project - www.midas-project.eu ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 15
  • 16. Questions ? Thank you for your attention More information: http://blog.simple-eng.com ICSSEA ‘12 – Paris Oct. 23-25 De Rosa et al., Service contract clauses as business rules 23/10/12 - 16