=Paper= {{Paper |id=None |storemode=property |title=SBVR based Business Contract and Business Rule IDE |pdfUrl=https://ceur-ws.org/Vol-649/paper8.pdf |volume=Vol-649 |dblpUrl=https://dblp.org/rec/conf/ruleml/KamadaGS10a }} ==SBVR based Business Contract and Business Rule IDE == https://ceur-ws.org/Vol-649/paper8.pdf
  SBVR based Business Contract and Business Rule IDE

                Aqueo Kamada1,4, Guido Governatori 2, Shazia Sadiq3,

                       1
                         CTI , Rod. Dom Pedro I, km 143.6, Campinas, Brazil
                2
                    NICTA, Queensland Research Laboratory, Brisbane, Australia
                     3
                       The University of Queensland, ITEE, Brisbane, Australia
                                   4
                                     Unicamp, FT, Limeira, Brazil
                                     aqueo.kamada@cti.gov.br,
                                 guido.governatori@nicta.com.au,
                                       shazia@itee.uq.edu.au



       Abstract. We propose an IDE – Integrated Development Environment to model
       SBVR (Semantic of Business Vocabulary and Business Rule) compliant
       business rules [2] extracted from business contract of services and store them in
       an ontological structure of rules, facts and terms as defined in the SBVR
       metamodel. Business rules are based on principles of deontic logic for treating
       expressions in the form of normative policies. Deontic constraints express what
       parties to the contract are required to perform (obligations), what they are
       allowed to do (permissions), or what they are not allowed to do (prohibitions).



       Keywords: Business contract, Business rule, SBVR, Ontology, IDE



1 Introduction

One of the main difficulties in the software engineering area continues being the
mapping of business rules to computational systems. This scenario becomes much
more complicated due to the current Web based dynamic and highly competitive
business environment. Hence, the computational solutions for the business problems
cannot accompany the speed in which the change necessities appear. One of the main
sources of change is response to changes in regulations and contracts towards which
businesses are obligated to comply.
   Commonly, documents containing contracts and regulations define the strategies,
policies and relationships among organizations. From those documents arise the rules
that define the behavior of the business processes in the organizations [1]. Hence, the
computational systems must be compliant with these business documents.
   We propose an IDE – Integrated Development Environment to model SBVR
(Semantic of Business Vocabulary and Business Rule) compliant business rules [2]
extracted from business contract of services and store them in an ontological structure
of rules, facts and terms as defined in the SBVR metamodel. Business rules are based
on principles of deontic logic [3] for treating expressions in the form of normative
policies. Deontic constraints express what parties to the contract are required to
perform (obligations), what they are allowed to do (permissions), or what they are not
allowed to do (prohibitions).
   The next section discusses aspects related to business rules and business contracts
formalization. Section 3 presents some requirements on the business contracts edition.
Section 4 provides a conclusion and discussion on future researches.


2 Business Contracts formalized as SBVR Business Rules

   This section discusses some aspects related to the formalization of business
contracts and business rules. First, we present a business contract, initially introduced
in [4] and then we show how it could be formalized as SBVR compliant rules.
   The contract example is an agreement between an ISP Provider and a Purchaser of
ISP services. The contract is structured in terms of a number of clause groups, each of
which contains contract conditions. In [5] we propose the transformation of such
contract clauses into FCL (Formal Contract Language). FCL was introduced in [6] for
the formal analysis of business contracts and it is based on previous work [7] and on
normative positions based on Deontic Logic with Directed Obligations [8].
   Usually a contract comprises two types of clauses: definitional clauses giving the
meaning of the terms used in the contract and clauses specifying the normative
behaviors (i.e., giving the obligations, permissions, prohibitions the signing parties of
the contract are subject to). To save space, we will concentrate only on some
normative specifications of a contract, which are the sections 5 and 6 of the contract
[4] that will be used in the subsequent sections.

                             CONTRACT OF SERVICES

   This Deed of Agreement is entered into as of the Effective Data identified below.
   BETWEEN ABC Company (To be known as the Purchaser)
   AND ISP Plus (To be known as the Supplier)
   WHEREAS (Purchaser) desires to enter into an agreement to purchase from
(Supplier) Application Server (To be known as (Service) in this Agreement).
   NOW IT IS HEREBY AGREED that (Supplier) and (Purchaser) shall enter into
an agreement subject to the following terms and conditions:
    …
5 Service Delivery
    5.1 The (Supplier) shall ensure that the (Services) are available to the (Purchaser)
        under Quality of Service Agreement (http://supplier/qos1.htm). (Services) that
        do not conform to the Quality of Service Agreement shall be replaced by the
        (Supplier) within 3 days from the notification by the (Purchaser), otherwise
        the (Supplier) shall refund the (Purchaser) and pay the (Purchaser) a penalty
        of $1000.
    5.2 The (Supplier) shall on receipt of a purchase order for (Services) make them
        available within 1 days.
  5.3 If for any reason the conditions stated in 4.1 or 4.2 are not met, the
      (Purchaser) is entitled to charge the (Supplier) the rate of $ 100 for each hour
      the (Services) are not delivered.
6 Payment
  6.1 The payment terms shall be in full upon receipt of invoice. Interest shall be
      charged at 5 % on accounts not paid within 7 days of the invoice date. The
      prices shall be as stated in the sales order unless otherwise agreed in writing
      by the (Supplier).
  6.2 Payments are to be sent electronically, and are to be performed under
      standards and guidelines outlined in PayPal.
…

   The problem is how these contract clauses could be transformed into
computational code. According to MDA methodology, this kind of contract clauses, if
formalized, they can be transformed into computational code. Although there are a lot
of discussion around the definition of what “business rule” means [2], [9] in the
context of this work, a business rule is "a rule that can be interpreted by computers,
that defines or restricts some aspects of a business, introducing obligations or needs,
according to the organization policies" [10]. Following are some business rules in the
context of ISP service community:
      The (Supplier) shall on receipt of a purchase order for (Services) make them
         available within 1 day.
      The payment terms shall be in full upon receipt of invoice.
      Payments are to be sent electronically, and are to be performed under
         standards and guidelines outlined in PayPal.
   The main objective of the SBVR metamodel [2] is to allow business people to
define the policies and the rules that drive the organizations in the business people’s
own language, in terms of the artifacts with which they perform the businesses.
Besides, the other objective is to capture those rules in a clear way, without
ambiguity, and quickly transformable in other representations.
   According to SBVR metamodel a business rule can be expressed formally in
statements in a structured English language using a font style convention. There are
four font styles with formal meaning: (i) term - the ‘term’ font is used for a
designation for a noun concept (other than an individual concept); (ii) Name - the
‘name’ font is used for a designation of an individual concept that tend to be proper
nouns (e.g., Washington); (iii) verb - the ‘verb’ font is used for designations for fact
types — usually a verb, preposition, or combination thereof; and (iv) keyword - the
‘keyword’ font is used for linguistic symbols used to construct statements – the words
that can be combined with other designations to form statements and definitions (e.g.,
‘each’ and ‘it is obligatory that’). For example, in the business rule, adapted from
the previous contract of service based on clause 6.1, as shown in the Figure 1,
includes four keywords or phrases, two designations for noun concepts and two for
fact types.
 It is obligatory that the invoice is paid in full if the invoice is received.

                 Keyword for                   Designation           Keyword for           Designation
                 a pronoun                 for a fact type           a pronoun         for a fact type
  Keywords for
                            Designation                Keyword for              Designation
  a modality
                        for an object type             a condition          for an object type

                               Figure 1.        Business rule elements.



3 Contract of Services IDE

   A Contract of Services IDE (Integrated Development Environment) should provide
some editors and functionalities to define contracts, business rules, facts and terms.
The business contract editor should provide specific templates using community
terminology to facilitate the inclusion of contract clauses as business rules, which are
compliant to the SBVR metamodel. Besides, the business fact editor should provide
templates to facilitate the inclusion of terms and fact types, which will be components
for the business rules. In this way, considering the ISP services community, the IDE
must provide facilities to define object type designations for supplier, purchaser and
service terms; to define facts, such as, “service is replaced within 3 days” and
“service is under Quality of Service Agreement” by combining terms and fact type
designations; and to define rules, such as, “It is obligatory that the supplier ensure to
the purchaser that the service is refunded and a penalty of $1000 is paid if the
service is not replaced within 3 days” by composing keywords, terms and facts. All
these elements are meaningful to that community and should be defined using the
IDE. When the business analyst defines terms, verbs, facts and rules contained in a
contract of service, they will be stored in the Business Rule Ontology, which is the
core of the IDE infrastructure.
   Figure 2 gives an idea of how could be the external interface of an IDE to define
business contracts and rules. From this window, the user can access all the main
features that he/she can perform in contracts, rules, facts and terms edition activities.
On the top part there are usual toolbars as in many IDEs. In the third line there are tab
controls for Contracts, Business Rules, Facts and Terms to coordinate user actions
according to what he/she wants to perform. In the middle, there are two panels: the
left one is used to browse rules, facts and terms and de right one is to create or edit
contracts and its components. At the bottom there is another panel to hold the
business rules organized as ruleset.
    Figure 3 shows the class diagram for the Business Contract Ontology. The Business
Contract Ontology instantiates a structure similar to Business Vocabulary+Rules,
defined in SBVR [2]. Thus, it organizes the business terms, concepts and rules
specified in the business terminology that make sense for a user community. It also
organizes the relationships and the existing associations among these elements. To
provide the ability in the definition of connections among concepts that are of the
organization interest the repository maintains a semantic structure in the business
terminology.
Figure 2.     Interface Prototype for the Business Contract and Business Rules IDE




            Figure 3.    Class Diagram for Business Contract Ontology
   A vocabulary is composed of two fundamental groups of elements: (i) terms,
representing concepts about anything, any concept, or any significant fact for a
business community and (ii) verbs, which are fundamental elements of predicates and
are the base for the representation of facts. On the other hand, a Rule set is a
"collection of business rules grouped together for some purpose", as defined in SBVR
metamodel [2]. The business rules are composed by keywords, facts and conditions.
The keywords are very useful in the model creation to formalize rules without
ambiguities. A fact is a simple period and it is composed of one or more terms that
can be associated to a predicate. Facts can be grouped in conditions. All these
elements are properly organized in the repository so that the business rules are
formalized referencing these elements consistently.
   Considering the business to business (B2B) scenario and the contract of services
above mentioned the associated rule set contained in the Business Rules Ontology
should include all the rules of the contract. Other issues on the IDE requirements can
be seen in [10]. Figure 4 presents an instance, included in the Business Rule
Ontology, for the service replacement rule model.




                      Figure 4.     Model for Service Replacement rule



4 Conclusions

   The proposed IDE aims to facilitate the contract elaboration process by providing
editors, tools and templates for definition of contracts, business rules, facts and terms
customized for specific user community.
   The results indicate that the concepts, ideas and proposed IDE are promising.
Besides business contracts and rules formalization technologies, services (SOA),
repositories and ontologies, it seems that the complete solution for the mentioned
problems includes the (i) inclusion of a mechanism in the IDE to contemplate process
composition modeling using, for instance, languages such as BPMN and that could
make transformation to executable languages like WS-BPEL; and (ii) development of
a prototype implementing the IDE, including repository instances for ontologies,
adherent to the MOF metamodel, with standardized query and manipulation language.
A preliminary presentation version of this work is available at
http://www.cti.gov.br/images/stories/cti/publicacoes/pdf/2010/SBVR_basedBusinessContract_and
_BusinessRuleIDE.pdf.



References

1. S.Hildreth, Rounding Up Business Rules. ComputerWorld Software. ID, (2005).
2. OMG”Semantics of Business Vocabulary and Business Rules (SBVR), v1.0 OMG
   Available Specification. (2008) http://www.omg.org/spec/SBVR/1.0/PDF/. Access in
   March/2010.
3. S. Beller, “Deontic norms, deontic reasoning, and deontic conditionals,” Thinking &
   Reasoning, Volume 14, Issue 4, November, pages 305 – 341 (2008).
4. G. Governatori, Z. Milosevic and S. Sadiq, “Compliance checking between business
   processes and business contracts,” Proc. The 10th International Enterprise Distributed
   Object Computing Conference - EDOC (2006), Hong Kong, pp. 221–232.
5. Kamada A., Governatori G., Sadiq S., “Transformation of SBVR compliant business
   rules to executable FCL rules”, 4th International Web Rule Symposium (RuleML-
   2010), Washington, DC, USA, 2010.
6. G. Governatori and Z. Milosevic, “A Formal Analysis of a Business Contract Language,”
    International Journal of Cooperative Information Systems (IJCIS), Volume 15, Number 4,
    pp.659-685 (2006).
7. G. Governatori. Representing business contracts in RuleML. Int. J. of Cooperative Inf. Sys.,
    14(2-3):181–216, 2005.
8. S. Kanger. Law and logic. Theoria, 38:105–32, 1972.
9. Kamada, “Service Execution based on Business Rules”, PhD Thesis in Computing
    Engineering, Unicamp, Campinas, Brazil, 2006.
10. Kamada, A. Figueiredo and M. Rodrigues, “Ontology based Business Rules and Services
    Integration Environment ,” in Handbook of Research on E-services in the Public Sector: E-
    government Strategies and Advancements, Editors: Abid Thyab Al Ajeeli, Yousif A. Latif
    Al-bastaki, Jeihan Abu-tayeh, Information Science Publishing, March 2010.