<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Business Contracts for B2B</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrew Goodchild</string-name>
          <email>andrewg@dstc.edu.au</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Charles Herring</string-name>
          <email>herring@dstc.edu.au</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zoran Milosevic</string-name>
          <email>zoran@dstc.edu.au</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Distributed System Technology Center (DSTC) Level 7, GP South, The University of Queensland</institution>
          ,
          <addr-line>QLD, 4072</addr-line>
          ,
          <country country="AU">AUSTRALIA</country>
        </aff>
      </contrib-group>
      <fpage>63</fpage>
      <lpage>74</lpage>
      <abstract>
        <p>This paper presents an approach for the specification and implementation of business contracts needed for Business-to-Business (B2B) services. We first examine typical elements of business contracts and their usage. This analysis sets a foundation for 1) modeling contracts and 2) developing a role-based architecture that supports typical operations in the contract's lifetime. We explore how contracts can be encoded in XML and present an approach for monitoring and enforcing of contracts. This approach provides a flexible way of modifying rules of enforcement, as trading arrangements change. A real-world contract example is used to illustrate the concepts described.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Many enterprises are eager to take advantage of the
emerging "Internet Economy". Internet based
commerce offers more potential than just online
storefronts (a.k.a. Business-to-Customer (B2C)) and
auction sites (a.k.a. Customer-to-Customer (C2C)), it
also offers opportunities in Business-to-Business
(B2B) e-commerce. B2B covers the area of online
exchange of information between trading partners.
Some examples of B2B include:</p>
      <p>Trading partner integration between enterprises,
forming supply and value chains and allowing
automated coordination of business operations
(e.g. order management, invoicing, shipping and
government procurement).</p>
      <p>Business process integration. Integration of
commerce sites, Enterprise Resource Planning
systems and legacy systems.</p>
      <p>Business-to-business portals enabling formation
of trading communities, electronic catalog
management, content syndication, and post-sale
customer management. Example sites include
www.mySAP.com, www.I2I.com and
www.ariba.com.</p>
      <p>A fundamental issue faced by many developers of
B2B systems is how to ensure that you can trust a
party that you are dealing with at arms length. The
primary mechanism for doing this is by setting up a
business contract and depending on the law to enforce
the terms of the contract. The aim of this paper is to
provide mechanisms to facilitate electronic business
contracting. This involves support for electronic
contract representation and also support for various
contract operations. Typically, these include contract
negotiation, validation, signing, tracking, monitoring
and enforcing contract terms and conditions
Section 2 starts this paper off by stating the
requirements for business contracts in the context of
B2B. Section 3 outlines a role-based architecture to
support typical contract operations. Section 4 explains
how XML can be used for the specification of
business contracts. Section 5 presents an approach of
using BizTalk technology to support the monitoring
of business contracts. Section 6 concludes the paper.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Business Contracts for B2B</title>
      <p>A contract is a legally enforceable agreement in
which two or more parties commit to certain
obligations in return for certain rights [R89]. In a B2B
context this can range from a simple one-page
purchase order for the sale of goods, to an extremely
complex thousand-page document for a trade level
agreement between multinational businesses.
In general, most B2B scenarios can be generalized to
a 5-phase trading process, of which contract
formation is one phase [C93]:
• Pre-contractual phase: customers identify
products or services and possible sources of
supply;
• Contractual phase: creation of a formal
relationship between buyer and seller, covering
contract negotiation and validation operations;
• Ordering and Logistics phase: placing of
purchase order, delivery of goods and services;
•
•</p>
      <p>Settlement phase: invoicing, payment
authorization and payment; and
Post-processing phase: gathering information for
management reports, e.g. trade statistics.</p>
      <p>The focus of this paper is on the contractual phase
and in particular supporting electronic contract
representation and contract monitoring and enforcing
operations.</p>
      <sec id="sec-2-1">
        <title>2.1 Elements of a Business Contract</title>
        <p>There are up to four elements needed to create a valid
business contract [R89]. First, an agreement has to be
reached on all essential conditions of the contract.
The second element is the notion of consideration.
Each party establishes the obligation to give
something to each other. Consideration can take the
form of money, services rendered, property or
individual rights. The third element is that of capacity
(or competence): ensuring that parties entering into
the contract are lawfully capable of agreeing to
contracts (e.g. whether an individual has the authority
to represent their organization). Finally, the legal
purpose of the contract must be established. A
contract cannot be enforced unless the actions agreed
upon are legal in the jurisdiction where the contract is
made.</p>
        <p>In general, each of these elements will appear in a
business contract as clauses covering [FL96]:
• The description of parties involved, including:
names, addresses, roles etc;
• The definition and interpretation of terms used in
the contract;
• The jurisdiction under which the validity,
correctness, and enforcement of the contract will
operate;
• The duration and territory1 of the contract, which
defines the times and places at which the contract
is in force;
• The nature of consideration e.g. fees, services
rendered, goods exchanged, rights granted, etc;
• The obligations associated with each role, which
is expressed in terms of the criteria over the
considerations. This includes terms and
conditions for invoicing and payment such as
warranties, delivery, liability, rejection,
termination and accounting provisions.
1 Note that the territory of a contract refers to what
geographical areas the contract covers. Whereas the
jurisdiction of a contract refers to which location’s
laws the contract is subject to. For example, the
territory of a contract may cover all trade between
two parties in Brisbane, and the jurisdiction may be
covered by the laws of the State of Queensland.</p>
        <p>A sample contract illustrating these elements is
provided in appendix A.</p>
        <p>In the context of B2B, many of the terms and
conditions in the contract will form part of the
software requirements that specify behavior of a B2B
system. For example, terms and conditions associated
with invoicing and payment will dictate what forms
of electronic invoices are acceptable, when they are to
be received, and how the payment is to follow. There
will also be many terms and conditions that cannot be
implemented (or are only partially automatable) and
would require human actions and interventions.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Standardizing Contracts</title>
        <p>In some business environments, such as insurance,
cargo, real estate and banking, it would become
highly complicated and costly if the terms of every
contract had to be newly settled for each transaction.
Significant savings can be achieved by reusing
standard form contracts for newly established contract
agreements [T95]. The terms of such standard
contracts can be dictated by one party (e.g. the seller)
or by a third party (e.g. in Queensland the Rental
Tenancy Authority sets out a standard lease
agreement for all leases in Queensland). Standard
form contracts are also available for a fee from
commercial organizations2, which will provide
general-purpose contracts for many business
situations.</p>
        <p>In some instances, new contracts can include standard
contract clauses [FL96]. For example, some large
institutions, like universities and government
departments, may outline policies on standard
contract clauses to be included in all contracts of a
certain nature. In some cases standard contract
clauses are defined by a standards body and are in use
between many businesses. For example, the
International Chamber of Commerce (ICC)3 has
outlined a set of "Incoterms" for use in specifying
departure, shipment and arrival terms in international
sales contracts.</p>
        <p>In terms of B2B, standard form contracts are
essential, as they allow business to confidently
operate at arms length. A business can deal with
another business without the need to negotiate a new
contract for each transaction. Furthermore, the
standardized nature and the regular use of standard
form contracts means that many elements are stable
enough to be implemented as components in a B2B
2 for example: http://www.legaldocs.com/
3 http://www.iccwbo.org/
system. Finally, as many standard form contracts
share similar elements and contract clauses, there
exists the possibility to reusing components in
different B2B systems.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.3 Support for electronic contracting operations</title>
        <p>The discussion in the above subsection suggests that
the availability of electronic representation of
standard contract forms and clauses can bring
significant savings to the process of creating and
negotiation contract terms. Electronic contract forms
can be stored in an electronic repository that can be
subsequently accessed and used by businesses to
facilitate the definition of their mutual obligations.
It is important to note however that by electronic
contracting we do not only mean an electronic version
of contract forms but also a wide range of
possibilities related to the automation of the typical
contracting procedures or processes such as:
•
•
•
•
•
•
location of suitable contract templates and/or
contract clauses,
electronic negotiation of contracts,
electronic signing of a contract, and having this
as an evidence of the agreement; this can bring
significant savings, in particular in cases where
contracts involve multiple, geographically
distributed trading partners, such as those related
to international contracts,
electronic tracking - This allows timely reaction
to some important deadlines such as contract
termination, thus making it possible to
renegotiate a subsequent contract and put it in
place, before or immediately after the existing
contract terminates.
monitoring of the behaviour of the trading
partners who have entered in contractual
relationship and, possibly,
enforcing behaviour of trading partners so that
their contractual operations are met.</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.3 Legal Enforceability of B2B</title>
      </sec>
      <sec id="sec-2-5">
        <title>Contracts</title>
        <p>An essential element of trust in a B2B system is the
legal enforceability a contract. In order to create
certainty for electronic contracts, legal groups, such
as American Bar Association (ABA), have
established several rules for enforcement of a
contracts in the B2B area [W94]. These rules cover
issues such as fraud, transmission and receipt of
messages, evidentiary concerns, prior terms and
conditions, and liability due to failures or
malfunctions. Discussion of these rules and their
implications is out of the scope of this paper.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Key Contract Related</title>
      <p>for B2B Applications</p>
    </sec>
    <sec id="sec-4">
      <title>Roles</title>
      <p>Based on the above requirements for business
contracts in B2B systems, we have identified the
basic roles needed to support typical operations
associated with contract establishment, monitoring
and enforcement [MB95, MAL96]. These roles are:
The Contract Repository (CR) is needed to store
standard form contracts and standard contract clauses.
The Notary is used to store signed instances of
standard form contracts which, can later be used as
evidence of agreement in contract monitoring and
enforcement activities.</p>
      <p>The Contract Monitor (CM) enables monitoring of
the activities of parties by measuring their
conformance to contractual terms and conditions and
signals the contract enforcer if it detects a violation.
The Contract Enforcer (CE), upon being signaled by
the CM, performs enforcing actions such as sending a
message to various parties informing them of the
violation and possibly preventing further access to the
system by non-conforming parties.</p>
      <p>The Contract Validator (CV) ensures the creation of
legally valid contract instances by checking the four
aspects of contract validity (discussed in 2.1):
• Competence. To accomplish this, the CV verifies
the capacity of parties willing to enter a
contractual relationship.
• Clarity. In most cases the contract semantics will
be unambiguous if it is derived from a template
in the CR. The CV can be used to provide
additional checking if needed.
• Legal purpose. The legal purpose of a clause or
contract can be validated based on information in
a repository of legal rules.
• Consideration. The CV can ensure the contract
contains contract elements describing what is
exchanged between the parties.</p>
      <p>Some elements of contract validation are very
difficult for a computer to perform. For example, the
clarity and legal purpose elements are very difficult to
model and verify. Attempts have been made in the
area of deontic logic, however, this work is still
preliminary [TT98]. One approach to address this
problem is to establish some systems of credentials
that would
templates.</p>
      <p>guarantee legal validity of contract
Some elements of contract validity are possible to
A preamble which outlines the parties involved
in the contract and the nature of the
consideration;</p>
      <p>A list of contract clauses, clustered in logical
•
•
•
•
•
automate, such as checking the consideration aspects
(by inspecting signed contract instances) and
competence aspects (by enforcing rules for signing
contracts by people with the legal authority to do so,
as discussed in [MAL96]).</p>
      <p>The Contract Negotiator (CN) is an optional role that
can be used to mediate the negotiation of contracts in
the pre-contractual phase. Automated contract
negotiation is another area with significant challenges
as much of this work requires reasoning about the
effect of obligations outlined in a contract and then
negotiating based on this. Some attempts to solve
related problems have been made in the area of
intelligent agents [S96].</p>
    </sec>
    <sec id="sec-5">
      <title>4. Use of XML technology to support contracts</title>
      <p>Based on the analysis of contracts presented in
section 2.1, we have defined a model for contracts.
The model (shown in figure 1) for a contract is
broken down into the following elements:
groups. In some cases, a contract clause itself
may be a pointer to a standard contract clause
provided by an external institution;
An approval section which enumerates whom
from each party approved the contract; and
A digital signature section with digital signatures
from the appropriate parties listed in the approval
section; and
Finally, a separate section contains a list of policy
specifications stating contract enforcement rules
according to the agreed contract clauses. This
aspect will be explained in detail in section 4.2.</p>
      <sec id="sec-5-1">
        <title>4.1 Describing Contracts</title>
        <p>In this paper, we will be encoding this model using
XML. Given the textual nature of business contracts,
XML is the logical choice for capturing the structure
of a contract while preserving the text of the contract.
Furthermore, essential pieces of emergent XML
infrastructure can be used to advantage, namely:
CBL, XML-DSig, XSLT, and XML repositories as
will be discussed in the following sections.
4.1.1 Use of CBL
Common Business Language (CBL), devised by
Commerce One4 defines a set of XML documents and
XML building blocks that enable businesses to
assemble e-commerce applications quickly. CBL has
made important contributions to CommerceNet’s
ECO5 semantic recommendations and is available in
the emerging XML.org and Biztalk.org repositories
and the "electronic business XML initiative"6. CBL
provides a “document service architecture” enabling
the exchange of:
•
•
•
•</p>
        <p>Documents to send, reply to and check the status
of purchase orders;
Documents related to invoices;
Documents used to check the price and
availability of goods; and</p>
        <p>Documents used to maintain product catalogs.
Each of these documents is built out of smaller
elements, such as elements for customer details,
delivery information, product descriptions, names,
addresses, list of part numbers, prices, currencies,
countries, dates, etc. This is an important feature as it
already provides elements that can be reused in a
business contract specification.</p>
        <p>CBL also provides the concept of a contract, which is
very brief and only includes a contract identifier and
start and end dates. In this paper we have taken the
CBL contract and extended it to include the additional
elements illustrated in figure 1.</p>
        <p>Appendix B provides an example of a CBL-based
description of the contract introduced in Appendix
A7.
4.1.2 Other Related XML Technologies
The standard form contracts are stored in the Contract
Repository. This can be implemented using any
number of existing XML-enabled repositories, such
as relational databases provided by Oracle, Informix,
Sybase and Microsoft. Specialized XML repositories
can also be used.</p>
        <p>The agreed upon and signed contract instances are
stored in a Notary repository, which can be
4 http://www.commerceone.com
5 http://eco.commerce.net
6 http://www.ebxml.com
7 Note that the schema for this XML document has
not been included in this paper to conserve space. It is
available upon request.
implemented using the
implementation choices as above.
same
repository
The signing of contract instances can be facilitated
using XML-DSig compliant signatures. XML-DSig8
is a digital signature standard currently being jointly
worked upon by the W3C and IETF. The use of such
signatures will prevent fraud by providing
mechanisms to guarantee integrity, authenticity and
privacy of XML documents. Further protection can
also be achieved by using a third party, such as
Verisign9, as a certificate authority to prevent the
tampering with of signatures by one of the parties.
Finally, to facilitate human user viewing of contracts,
an XML contract can be rendered in HTML by using
a transformation technology like XSLT10. This
implementation detail is beyond the scope of this
paper.</p>
      </sec>
      <sec id="sec-5-2">
        <title>4.2 Describing contract policies</title>
        <p>In this paper, the contractual terms and conditions are
modeled as a policy which specifies that a role is
either forbidden or obligated to perform actions under
certain conditions. Each of the contract clauses can be
regarded as a high-level policy statement. However,
these statements need to be further refined so that
they express constraints on the actions that parties
involved in contract need to fulfill – as a result of
their contractual obligations. These actions can then
be monitored, if required, and if they do not comply
with those agreed in the contract, then the Contract
Monitor can signal this non-performance to the
Contract Enforcer to perform an action on a specified
role.</p>
        <p>The formulation of this policy system has been
influenced jointly by the Event-Condition-Action
(ECA) paradigm from active databases [UW97] and
the ODP enterprise language [SD99]. The core part of
the grammar for this policy system is formulated as:
&lt;policy&gt; ::= &lt;variable_declaration&gt;*
when &lt;condition&gt;
&lt;action&gt;
must [not] occur where &lt;condition&gt;
otherwise &lt;trigger_action&gt;;
&lt;action&gt; ::= action(&lt;action_name&gt;, &lt;actor&gt;,
&lt;audience&gt;, &lt;time&gt;, &lt;body&gt;)
&lt;trigger_action&gt; ::= trigger_action(&lt;action_name&gt;,
&lt;audience&gt;, &lt;body&gt;)
8 http://www.w3.org/Signature/
9 http://www.verisign.com/
10 http://www.w3.org/Style/XSL/
To illustrate the various parts of this grammar
consider the following policy statement:
P = Contract.Purchaser;
S = Contract.Supplier;
start_date = Contract.Commencement_Date;
price_list = Supplier.price_list;
when Contract.State == ’initial’
action(send_purchase_order, P, S, t1, b1),
must occur where
t1 &gt;= start_date and
t1 &lt;= (start_date + 7 days) and
validate_price_list(b1, price_list) and
validate_delivery(b1)
otherwise
trigger_action(send_notice_of_breach, *, "Purchaser
failed to send valid purchase order");
This policy statement encodes clauses 2.1, 3.1, 3.2,
4.1 and 7.1 in the contract in Appendix A. These
clauses collectively specify that a purchase order
must be sent within 7 days of the commencement of
the contract, otherwise a notice of breach will be sent.
The policy statement starts out by defining a number
of convenient variables, such as P, S, start_date, etc
that can be used throughout the policy statement.
These variables actually refer to values within the
contract. For example, the variable P is defined as
the purchaser within the contract.</p>
        <p>The second part of the policy specifies when a policy
should be checked. In the example above the when
condition specifies that the contract is in its initial
state, i.e. no actions have occurred yet, it should be
checked. Note that for the when statement to be
effective the system needs to be able to query the
state of a contract. Therefore, the contract monitor
needs to maintain the state of a contract and make it
accessible for policy evaluation. Through the state
mechanism it is also possible to specify sequences of
actions that must occur by using a set of policy
statements linked by changes of state.</p>
        <p>The third part specifies that an action called
send_purchase_order must be performed by an actor
called P (the purchaser) on an audience S (the
supplier) at time stored in the variable t1 with the
body of the message stored in variable b1.</p>
        <p>The fourth part specifies that the action must occur
within 7 days of the contract start date and the body
of the purchase order must use the valid price list and
specify the delivery terms for the goods. Note that in
this section it is possible to specify that operations
may not occur.</p>
        <p>The fifth and final part of the specification nominates
the action that must be triggered if this policy is not
met. In this case, a notice of breach is sent to both
parties informing them that the purchaser failed to
send a valid purchase order.
4.2.1 Embedding Policies in XML
Policy statements can be embedded in XML. The
benefits of doing this are that additional annotations,
such as references to clauses in the main contract can
be added. For example, the above policy could be
embedded as follows11:
&lt;EnforcementPolicySpec ContractRef=’CB1’&gt;
&lt;Policy PolicyID = ’P1’&gt;
&lt;Reference ClauseRef=’C2.1’/&gt;
&lt;Reference ClauseRef=’C3.1’/&gt;
&lt;Reference ClauseRef=’C3.2’/&gt;
&lt;Reference ClauseRef=’C4.1’/&gt;
&lt;Reference ClauseRef=’C7.1’/&gt;
&lt;PolicyStatement&gt;</p>
        <p>P = Contract.Purchaser;
S = Contract.Supplier;
start_date = Contract.Commencement_Date;
price_list = Supplier.price_list;
when Contract.State == ’initial’
action(send_purchase_order, P, S, t1, b1),
must occur where
t1 &amp;lte start_date and
t1 &amp;gte (start_date + 7 days) and
validate_price_list(b1, price_list) and
validate_delivery(b1)
otherwise
trigger_action(send_notice_of_breach, *,
"Purchaser failed to send valid purchase
order");
&lt;/PolicyStatement&gt;
&lt;/Policy&gt;
&lt;Policy&gt;</p>
        <p>… other policy statements …
&lt;/Policy&gt;
&lt;/EnforcementPolicySpec&gt;
Annotations to policies can be used later to help
diagnose the nature of the violation. For example, the
system could provide a user with the text of violated
clauses by following the clause references.
4.2.2 Open Issues
The policy specification language included in this
paper is our first step towards developing a more well
11 Note that the schema for this XML document has
not been included here to save space. This schema is
available upon request. Also note that it is possible to
define the syntax of the policy language in XML.
This has certain advantages in terms of processing
however, we have not done that here, as a textual
form is more readable.
defined language. There are a number of issues yet to
be considered including:
• Expressiveness: Can most useful types of
policies be specified? What classes of polices are
difficult or impossible to express?
• Modality: Currently only two forms of modality
are supported: must and must not. Should other
weaker forms of modality such as may or should
be supported?
• Computability and Complexity: Can all
expressible statements be evaluated in a finite
time? Which classes of policy statements take an
unreasonable amount of time to evaluate?
• Conflicts: How do you detect and deal with
conflicts between policies?
• Termination: Can we guarantee that if policies
cause other policies to be triggered that
eventually the system will reach a steady state
and no more policies will be triggered?
• Confluence: Is the order of evaluation of policy
statements relevant?
• Practicality: Does the underlying B2B
infrastructure provide enough information to
enable policy statements to be evaluated?
In future work we hope to address some of these
issues by establishing a model and formal semantics
for this language, and then demonstrate its feasibility</p>
        <sec id="sec-5-2-1">
          <title>Policy</title>
        </sec>
        <sec id="sec-5-2-2">
          <title>Statements (in XML)</title>
        </sec>
        <sec id="sec-5-2-3">
          <title>Contract</title>
        </sec>
        <sec id="sec-5-2-4">
          <title>Monitor</title>
        </sec>
        <sec id="sec-5-2-5">
          <title>Manager</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>5. Implementation</title>
      <p>Previously, we have implemented a prototype of
various business contract application roles using
standard CORBA technology [M95]. We are
currently in the process of porting it to component
technologies such as J2EE and Microsoft’s Windows
DNA. This paper reports on our work in progress
related to the use of DNA’s BizTalk12. We are
experimenting with the BizTalk technology as it
offers facilities to support rapid prototyping of B2B
specific services and utilities. These services are
COM+ extensions that use the underlying storage
(SQL Server), transport (HTTP, SMTP, MSMQ,
SOAP, etc) and formats (XML, HTML, EDI X12,
EDIFACT, etc) to build B2B systems. The utilities
include: BizTalk XML Schema Editor to create and
modify XML schema specifications; a BizTalk
Mapper to provide data transformations; and other
administration tools, that provide control over
document flow, document tracking, business analysis
and troubleshooting.</p>
      <p>In the following section, we will describe how the
role of a contract monitor can be implemented. Other
roles will not be discussed. Some roles such as the
contract repository and notary can be implemented in
a straightforward fashion using SQL Server. Other</p>
      <sec id="sec-6-1">
        <title>SQL-Server (message archive &amp; contract state table)</title>
        <p>through an implementation.</p>
      </sec>
      <sec id="sec-6-2">
        <title>MSMQ triggers which</title>
        <p>archive messages</p>
      </sec>
      <sec id="sec-6-3">
        <title>SQL triggers which create messages</title>
      </sec>
      <sec id="sec-6-4">
        <title>Party A</title>
      </sec>
      <sec id="sec-6-5">
        <title>MSMQ</title>
      </sec>
      <sec id="sec-6-6">
        <title>Party B</title>
        <p>12 http://www.microsoft.com/biztalkserver
roles such as the contract negotiator and validator are
complex and are out of the scope of this paper.</p>
        <sec id="sec-6-6-1">
          <title>5.1 Implementing a Contract Monitor</title>
          <p>As illustrated in figure 2 the contract monitor could
be implemented by using some of the existing
BizTalk services. The central piece to this system is a
Contract Monitor Manager (CMM). The main role of
the CMM is to manage the various settings within the
SQL server and message queue. Over time as new
contracts are formed and old contracts are amended or
terminated each of these items will need to be added
to, updated and removed.</p>
          <p>When the CMM receives a policy statement, the
CMM analyses the &lt;action&gt; section of each policy
and installs triggers on a message queue. As each
party communicates messages to one another using
the message queue, the triggers will search for
appropriate messages to be archived on an SQL
server.</p>
          <p>Once a history of messages has been archived on the
SQL server, the sequence can be analyzed to
determine if the contract has been violated. This is
done in a two step process. First, triggers which are
designed to determine the state of the contract as
messages archive are created on the message archive,
This state is then stored in a contract state table. A
second set of SQL triggers are defined on the state
table and are based on the when &lt;action&gt; part of a
policy. When fired, these state-based triggers call
stored procedures, which inspect messages in the
message archive to determine their validity based on
the must [not] occur when &lt;condition&gt; part of the
policy statement. Finally, if the condition is violated
then the stored procedure raises a message on the
message queue based on the otherwise
&lt;trigger_action&gt; part of the policy.</p>
          <p>Finally, note that one of the advantages of defining
policy statements in a declarative fashion is that it
enables us to separate policy specification from how
the applications are actually built. This means that it
should be possible to build a contract monitor for a
system built on other methodologies such as
Workflow or RPCs without changing the policy
specification language.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusions</title>
    </sec>
    <sec id="sec-8">
      <title>Work</title>
      <p>This paper has outlined our work in progress, which
uses: 1) an XML-based business extension to describe
business contracts and 2) BizTalk server capabilities
to facilitate the process of encoding policies for
and</p>
    </sec>
    <sec id="sec-9">
      <title>Related</title>
      <p>[C93]
monitoring and enforcing contracts. The novelty of
our approach is that we provide support for a
declarative way of specifying policies for contracts.
The main benefit of this is that it enables a separation
between enforcement policy specification and the
functional specification of the operations needed to
support contract operations. The use of the BizTalk
platform enables flexible updates of contract
enforcement rules to accommodate changes in
business policies related to contract enforcement.
Our XML-based approach for specifying contracts is
similar to some of the results from the CrossFlow13
project, with the additional feature of using an XML
extension (i.e. CBL) to embody some business
documents semantics. Furthermore, our approach of
defining and implementing the roles needed to
support of contract operations has some similarity to
recent IBM work on contracts14. Unlike the IBM
approach, our approach is focussed on supporting
business and in particular legal views on contracts
and thus our business contract architecture does not
include low-level concerns such as security and
transport mechanisms used to support contract
operations. These can be regarded as implementation
choices specific to the deployment environment.
In this paper, we have also identified several open
issues that we plan to investigate in the future.
Examples of these issues include better support for
contract negotiation, conflict detection and resolution
of the legal rules when composing customized
contracts, and better support for policies to govern
service provision through cross-organizational
business process.</p>
    </sec>
    <sec id="sec-10">
      <title>7. Acknowledgements</title>
      <p>The authors would like to thank Andy Bond and
Linda Bird for their comments on this paper.
The work reported in this paper has been funded in
part by the Co-operative Research Centre Program
through the Department of Industry, Science &amp;
Tourism, Australia.</p>
    </sec>
    <sec id="sec-11">
      <title>8. References</title>
      <p>Clarke, R. "EDI is but one element
of electronic commerce", 6th
International EDI Conference, June
1993.
13 http://www.crossflow.org
14 http://www-4.ibm.com/software/developer/
library/tpaml.html#resources
[FL96]
[MAL96]
[MB95]
[R89]
[S96]
[SD99]
[T95]
[TT98]
[UW97]
[W94]</p>
      <sec id="sec-11-1">
        <title>Appendix A: Sample Contract</title>
        <p>CONTRACT FOR THE PURCHASE AND SUPPLY OF GOODS
3.3
3.4
4. Delivery
4.1
This Deed of Agreement is entered into as of the Effective Date identified below.</p>
        <p>BETWEEN [Name] AND: [Name]
of [Address] of [Address]
(To be known as the (Supplier) in this Agreement) (To be known as the (Purchaser) in this agreement)
WHEREAS (Supplier) desires to enter into an agreement to supply (Purchaser) with [Item] (To be known as (Goods) in this Agreement).
NOW IT IS HEREBY AGREED that (Supplier) and (Purchaser) shall enter into an agreement subject to the following terms and conditions:
1. Definitions and Interpretations
1.1 Price, Dollars or $ is a reference to the currency of the [Country] unless otherwise stated.
1.2 This agreement is governed by [Country] law and the parties hereby agree to submit to the jurisdiction of the Courts of the [Country]
with respect to this agreement.
2. Commencement and Completion
2.1 The commencement date is scheduled as [date].
2.2 The completion date is scheduled as [date].
2.3 The schedule may be modified by agreement as defined in Section 9.
3. Purchase Orders
3.1 The (Purchaser) shall follow the (Supplier) price lists.
3.2 The (Purchaser) shall present (Supplier) with a purchase order for the provision of (Goods) within 7 days of the commencement
date.</p>
        <p>The purchase order shall nominate the method of delivery as defined in Section 4.</p>
        <p>Purchase orders are to be sent electronically, and are to be interpreted under standards and guidelines outlined in Supplement A.
The (Purchaser) shall arrange for delivery to be made according to one of the following terms:
(a) The shipping and insurance of the (Goods) shall be the sole responsibility of and entirely at the expense of the (Purchaser).
(b) The shipping and insurance of the (Goods) shall be the responsibility of the (Supplier). The (Purchaser) shall provide the
(Supplier) at least [days] days notice and pay the carriage and insurance costs from the (Supplier) delivery price list.
5. Payment
5.1 The payment terms shall be in full upon receipt of invoice. Interest shall be charged at [percentage] on accounts not paid within 14 days of
the invoice date. The prices shall be as stated in the sales order unless otherwise agreed in writing by the (Supplier).
5.2 Payments are to be sent electronically, and are to be performed under standards and guidelines outlined in Supplement B.
6. Rejection
6.1 If the (Goods) do not comply with the Order or the (Supplier) does not comply with any of the conditions, then the (Purchaser) shall at its
sole discretion be entitled to reject the (Goods) and the Order. The (Purchaser) shall return the rejected (Goods) to the (Supplier) at the
(Purchaser) risk and expense or notify the (Supplier) to collect the (Goods). The (Supplier) may use its discretion to replace the (Goods)
according to the invoice or refund any monies paid.
7. Termination
7.1 If (Purchaser) fails to carry out any of its obligations and duties under this agreement (Supplier) may issue a notice specifying the
breach and request that it be remedied within 14 days after receipt of such notice.
7.2 If (Purchaser) fails to provide adequate remedy within the specified 14 days the agreement may be terminated forthwith.
8. Disputes
8.1 (Supplier) and (Purchaser) shall attempt to settle all disputes, claims or controversies arising under or in connection with the
agreement through consultation and negotiations in good faith and a spirit of mutual cooperation.
8.2 This method of determination of any dispute is without prejudice to the right of any party to have the matter judicially determined by
a [Country] Court of competent jurisdiction.
9. Amendment
9.1 This agreement may only be amended in writing signed by or on behalf of both parties.</p>
        <p>SIGNATURES
In witness whereof (Supplier) and (Purchaser) have caused this agreement to be entered into by their duly authorized representatives as of the
effective date written below.</p>
        <p>Effective date of this agreement: [day] day of [month] [year]</p>
      </sec>
      <sec id="sec-11-2">
        <title>Appendix B: XML Encoding of Sample Contract</title>
        <p>&lt;contract&gt;
&lt;contractbody ID=’CB1’&gt;
&lt;preamble&gt;
&lt;title&gt; CONTRACT FOR THE PURCHASE AND SUPPLY OF GOODS &lt;title&gt;
This Deed of Agreement is entered into as of the Effective Date identified below.
&lt;parties&gt; BETWEEN
&lt;party ID=’P1’&gt;&lt;name&gt; &lt;/name&gt; of &lt;address&gt; &lt;/address&gt; (To be known as the &lt;role&gt; Supplier &lt;/role&gt; in the agreement) &lt;/party&gt;
AND
&lt;party ID=’P2’&gt;&lt;name&gt; &lt;/name&gt; of &lt;address&gt; &lt;/address&gt; (To be known as the &lt;role&gt; Purchaser &lt;/role&gt; in this agreement) &lt;/party&gt;
&lt;/parties&gt;
WHEREAS
&lt;partyref IDREF=’P1’/&gt; desires to enter into an agreement to supply &lt;partyref IDREF=’P2’ /&gt; with &lt;item ID=’I1’&gt; &lt;/item&gt;
NOW IT IS HEREBY AGREED that &lt;partyref IDREF=’P1’/&gt; and &lt;partyref IDREF=’P2’/&gt; shall enter into an agreement subject to the
following terms and conditions:
&lt;/preamble&gt;
&lt;clauses&gt;
&lt;clausegroup ID=’G1’ title = ’Definition and Interpretation’&gt;
&lt;clause ID=’C1.1’&gt;Price, Dollars or $ is a reference to the currency of the &lt;country&gt; &lt;/country&gt; unless otherwise stated. &lt;/clause&gt;
&lt;clause ID=’C1.2’&gt;This agreement is governed by &lt;country&gt; &lt;/country&gt; law and the parties hereby agree to submit to the jurisdiction of the
Courts of the &lt;country&gt; &lt;/country&gt; with respect to this agreement. &lt;/clause&gt;
&lt;/clausegroup&gt;
&lt;clausegroup ID=’G2’ title = ’Commencement and Completion’&gt;
&lt;clause ID=’C2.1’&gt; The commencement date is scheduled as &lt;date&gt; &lt;/date&gt;. &lt;/clause&gt;.
&lt;clause ID=’C2.2’&gt; The completion date is scheduled as &lt;date&gt; &lt;/date&gt;. &lt;/clause&gt;
&lt;clause ID=’C2.3’&gt; The schedule may be modified by agreement as defined in &lt;clausegroupref IDREF=’G9’/&gt;. &lt;/clause&gt;
&lt;/clausegroup&gt;
&lt;clausegroup ID=’G3’ title = ‘Purchase Orders’&gt;
&lt;clause ID=’C3.1’&gt; The &lt;partyref IDREF=’P2’/&gt; shall follow the &lt;partyref IDREF=’P1’/&gt; price lists. &lt;/clause&gt;
&lt;clause ID=’C3.2’&gt; The &lt;partyref IDREF=’P2’/&gt; shall present &lt;partyref IDREF=’P1’&gt; with a purchase order for the provision of &lt;itemref</p>
        <p>IDREF=’I1’/&gt; within [days] days of the commencement date. &lt;/clause&gt;
&lt;clause ID=’C3.3’&gt; The purchase order shall nominate the method of delivery as defined in &lt;clausegroupref IDREF=’G4’/&gt;. &lt;/clause&gt;
&lt;clause ID=’C3.3’&gt; Purchase orders are to be sent electronically, and are to be interpreted under standards and guidelines outlined in
&lt;supplementref IDREF = ’Supplement A’/&gt;. &lt;/clause&gt;
&lt;/clausegroup&gt;
&lt;clausegroup ID=’G4’ title = ’Delivery’&gt;
&lt;clause ID=’C4.1’ &gt; The &lt;partyref IDREF=’P2’/&gt; shall arrange for delivery to be made according to one of the following terms:
(a) The shipping and insurance of the &lt;itemref ID=’I1’&gt; shall be the sole responsibility of and entirely at the expense of the &lt;partyref</p>
        <p>IDREF=’P2’/&gt;.
(b) The shipping and insurance of the &lt;itemref ID=’I1’/&gt; shall be the responsibility of the &lt;partyref ID=’P1’/&gt;. The &lt;partyref
IDREF=’P2’/&gt; shall provide the &lt;partyref IDREF=‘P1’/&gt; at least &lt;days&gt; &lt;/days&gt; days notice and pay the carriage and insurance
costs from the &lt;partyref IDREF=‘P1’/&gt; delivery price list. &lt;/clause&gt;
&lt;clausegroup ID=’G5 ‘ title = ‘Payment’&gt;
&lt;clause ID=’C5.1’ behavior = ‘ ‘/&gt; The payment terms shall be in full upon receipt of invoice. Interest shall be charged at &lt;percentage&gt; &lt;/percentage&gt;
on accounts not paid within &lt;days&gt; &lt;/days&gt; days of the invoice date. The prices shall be as stated in the sales order unless otherwise agreed in
writing by the &lt;partyref IDREF=‘P1’/&gt;. &lt;/clause&gt;
&lt;clause ID=’C5.2’&gt; Payments are to be sent electronically, and are to be performed under standards and guidelines outlined in &lt;supplementref</p>
        <p>IDREF = ’SupplementB’&gt;.&lt;/clause&gt;
&lt;/clausegroup&gt;
&lt;clausegroup ID=’G6’ title=’Rejection’&gt;
&lt;clause ID=’C6.1’&gt; If the &lt;itemref IDREF=‘I1’/&gt; do not comply with the Order or the &lt;partyref IDREF=‘P1’/&gt; does not comply with any of the
conditions, then the &lt;partyref IDREF=‘P2’/&gt; shall at its sole discretion be entitled to reject the &lt;itemref IDREF=‘I1’/&gt; and the Order. The
&lt;partyref IDREF=‘P2’/&gt; shall return the rejected &lt;itemref IDREF=‘I1’/&gt; to the &lt;partyref IDREF=‘P1’/&gt; at the &lt;partyref IDREF=‘P2’/&gt; risk
and expense or notify the &lt;partyref IDREF=‘P1’/&gt; to collect the &lt;itemref IDREF=‘I1’/&gt;. The &lt;partyref IDREF=‘P1’/&gt; may use its discretion
to replace the &lt;itemref IDREF=‘I1’/&gt; according to the invoice or refund any monies paid.&lt;/clause&gt;
&lt;clausegroup ID=’G7’ title = ‘Termination’&gt;
&lt;clause ID=’C7.1’&gt; If &lt;partyref IDREF=‘P2’/&gt; fails to carry out any of its obligations and duties under this agreement &lt;partyref
IDREF=‘P1’/&gt; may issue a notice specifying the breach and request that it be remedied within &lt;days&gt; 14 &lt;/days&gt; days after receipt of
such notice. &lt;/clause&gt;
&lt;clause ID=’C7.2 ‘&gt; If &lt;partyref IDREF=‘P2’/&gt; fails to provide adequate remedy within the specified &lt;days&gt; 14 days &lt;/days&gt; the agreement
may be terminated forthwith. &lt;/clause&gt;
&lt;/clausegroup&gt;
&lt;clausegroup ID=’G8’ title = ‘Disputes’&gt;
&lt;clause ID=’C8.1’&gt; &lt;partyref IDREF=‘P1’/&gt; and &lt;partyref IDREF=‘P2’/&gt; shall attempt to settle all disputes, claims or controversies arising
under or in connection with the agreement through consultation and negotiations in good faith and a spirit of mutual cooperation.
&lt;/clause&gt;</p>
        <p>&lt;clause ID=’C8.2’ &gt; This method of determination of any dispute is without prejudice to the right of any party to have the matter judicially
determined by a &lt;country&gt; &lt;/country&gt; Court of competent jurisdiction.&lt;/clause&gt;
&lt;clausegroup ID=’G9’ title = ‘Amendment’&gt;
&lt;clause ID=’C9.1’&gt; This agreement may only be amended in writing signed by or on behalf of both parties.&lt;/clause&gt;
&lt;/clauses&gt;
&lt;approvals&gt;</p>
        <p>In witness whereof &lt;partyref IDREF=‘P1’/&gt; and &lt;partyref IDREF=‘P2’/&gt; have caused this agreement to be entered into by their duly authorized
representatives as of the effective date written below.</p>
        <p>Effective date of this agreement: &lt;date&gt; &lt;/date&gt;
&lt;approval partyref=’P1’ dsigref=’S1’&gt;
&lt;person&gt; &lt;/person&gt;
&lt;role&gt; &lt;role&gt;
Address for Notices:
&lt;address&gt; &lt;/address&gt;
&lt;/approval&gt;
&lt;approval partyref=’P2’ dsigref=’S2’&gt;
&lt;person&gt; &lt;/person&gt;
&lt;role&gt; &lt;role&gt;
&lt;partyref IDREF=’P2’/&gt;
Address for Notices:
&lt;address&gt; &lt;/address&gt;
&lt;/approval&gt;
&lt;/approvals&gt;
&lt;/contractbody&gt;
&lt;digitalsignature ID=’S1’&gt;
&lt;Signature xmlns="http://www.w3.org/2000/01/xmldsig#"&gt;
&lt;SignedInfo&gt;
&lt;CanonicalizationMethod Algorithm="http://www.w3.org/1999/07/WD-xml-c14n-19990729/" /&gt;
&lt;SignatureMethod Algorithm="&amp;dsig;dsaWithSHA-1"/&gt;
&lt;Reference IDREF="CB1"&gt;
&lt;DigestMethod Algorithm="&amp;dsig;sha1"/&gt;
&lt;DigestValue&gt;a23bcd43&lt;/DigestValue&gt;
&lt;/Reference&gt;
&lt;/SignedInfo&gt;
&lt;SignatureValue&gt;C0CFFrVLtRlk&lt;/SignatureValue&gt;
&lt;KeyInfo&gt;
&lt;KeyValue&gt;MIIBtzCCASwGByqGSM44BAE&lt;/KeyValue&gt;
&lt;/KeyInfo&gt;
&lt;/Signature&gt;
&lt;/digitalsignature&gt;
&lt;digitalsignature ID=’S2’&gt;
&lt;Signature xmlns="http://www.w3.org/2000/01/xmldsig#"&gt;
&lt;SignedInfo&gt;
&lt;CanonicalizationMethod Algorithm="http://www.w3.org/1999/07/WD-xml-c14n-19990729/" /&gt;
&lt;SignatureMethod Algorithm="&amp;dsig;dsaWithSHA-1"/&gt;
&lt;Reference IDREF="CB2"&gt;
&lt;DigestMethod Algorithm="&amp;dsig;sha1"/&gt;
&lt;DigestValue&gt;a15bcfg4&lt;/DigestValue&gt;
&lt;/Reference&gt;
&lt;/SignedInfo&gt;
&lt;SignatureValue&gt;C0CEFrVokRlk&lt;/SignatureValue&gt;
&lt;KeyInfo&gt;
&lt;KeyValue&gt;VKIBiY87OwGByqGSM44BAE&lt;/KeyValue&gt;
&lt;/KeyInfo&gt;
&lt;/Signature&gt;
&lt;/digitalsignature&gt;
&lt;/contract&gt;</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>