This use case illustrates a fundamental use of the RIF: to supply a vendor-neutral representation of rules, so that rule-system developers and stakeholders can do their work and make product investments without concern about vendor lock-in, and in particular without concern that a business partner does not have the same vendor technology. It also illustrates the fact that the RIF can be used to foster collaborative work. Each developer and stakeholder can make a contribution to the joint effort without being forced to adopt the tools or platforms of the other contributors.
John is negotiating an electronic business contract regarding the supply of various types of items that Jane's company is manufacturing. Jane and John interchange the contract-related data and rules involved in the negotiation in electronic form so that they can run simulations. Both agree on a standard Business Object Model / data model (i.e., vocabulary / ontology) for the goods and services involved - in this case an XML schema and appropriate test XML documents are interchanged with their rules. Since John and Jane run applications based on different vendors' rule engines and rule languages, they interchange the rules using the RIF; both vendors used can interpret the XML schema and data, and produce the results as an amended XML document. John's company defines its purchase orders in terms of an XML description of goods, packaging, delivery location and date with delivery and payment rules. A rule proposed by John might be the following:
If an item is perishable and it is delivered more than 10 days after the scheduled delivery date then the item will be rejected.
Jane replies with some suggested rule changes:
If an item is perishable and it is delivered more than 7 days after the scheduled delivery date but less than 14 days after the scheduled delivery date then a discount of 18.7% will be applied to this delivery.
John considers this and agrees with Jane. Both organizations utilize these rules in their operational systems using disparate rule representations internally to compute prices for this order and determine contract compliance.
Future requests for the supply of items by John's company are defined on their purchasing web site, as the appropriate XML schema and a RIF ruleset (or rulesets). This allows Jane's company and its competitors to respond electronically with XML cost sheets. Suppliers respond with multiple cost sheets with different variations on the RIF rules proposed by John's company, allowing John's company to review the alternative rules with their associated costs to determine whether they, as a business, would benefit by relaxing or adding new rules as proposed by suppliers.
Compliance model -- An obvious constraint on the rule languages used in John's and Jane's applications is that they must support a RIF class of expressiveness that is sufficient to express the rules they need to interchange. Although this is obviously true whether they use RIF for the interchange or not, in the RIF case, the applications may need to be aware of the RIF expressiveness class of the other part. In that sense, it motivates the "compliance model" requirement.
XML syntax -- the use case explicitely states that rules are interchanged as an XML document.
XML types -- the use case motivates the "XML types" requirement, since the agreed exchange data model in terms of which the rules are specified is an XML schema: for example if the rules are going to do tests and arithmetic on values transmitted over that XML then the semantics of those tests ought to be compatible with the corresponding XML datatypes - including all the annoying corner cases of NaNs, treatment of equality in floats/doubles, type promotion etc. If either end use different representations for the concrete types internally then the RIF "translators" are going to have to compensate.
Coverage -- suppose that Jane's company uses a Prolog-like rule language, and John's company uses a production rule language. To exchange rules, it must be possible to translate between rule language dialects. For example, prolog rule bodies map to production rule conditions and prolog rule heads map to production rule actions, all the while preserving the intended meaning.