The
RSI
Approach to Use Case Analysis
A ProtoPattern for Structured Use
Case Development
Mark
Collins-Cope
PDF version
This paper describes the RSI (requirement/service/interface) pattern for use case analysis. The RSI pattern for use case analysis separates use cases into three major categories, which are represented as stereotypes using the UML notation
Use case analysis is a requirements capture technique that is most often used in the early stages of OO and component development projects. It was first introduced by Ivar Jacobson in his book "Object Oriented Software Engineering" [1], although the description of use case analysis presented in this book has, in practise, been interpreted in many different ways (one of the consequences of which is that, seemingly at least, no two use case analysis projects ever deliver the same information). Broadly speaking, use cases assist in defining the functional requirements of computer systems. Following is a typical use case diagram:

Figure 1 - An
example use case diagram
The use case diagram in figure 1 is made up of the following elements:
Use case diagrams are typically supplemented with additional documentation, describing the detail of each use case.
Jacobson's use case are structured around business processes for which automated support is required. Page 350, section 13.3.1 of [1] describes the use case 'Transfer goods between warehouses'. The description of this use case contains both individual 'commands' ("Foreman issues command to transfer goods between warehouses", "Truck driver notifies system that he has arrived at the warehouse", etc.), and detailed user interface designs (diagrams of dialogs are shown). Much of the description is concerned with describing user interface dynamics (e.g. "the foreman may move between fields by using the tab key.")
Cockburn's work ("Structuring Use Cases with Goals" [2]) describes use cases in terms of a goal oriented sequence of steps. The following use case extract is taken from Cockburn's paper [2]:
Use Case: Get paid for car accident (insurance system):
Actor - Claimant
Actor goal - to get paid for a car accident
1. Claimant
submits claim with substantiating data;
2. Insurance
company verifies claimant owns a valid policy
3. Insurance
company assigns agent to examine case
4. Agent
verifies all details are within policy guidelines
5. Insurance
company pays claimant
Extensions
1a. Submitted data is incomplete
1a1. Insurance company requests missing information
… etc.
(Note that some steps of this description (e.g. step 1) are unlikely to be automated).
Cockburn goes on to describe how each step within the description can be viewed as a mini 'use case' in its own right - thus use cases are decomposed into sub-use cases. Cockburn describes the classification of use cases into 'summary goals', 'user goals', 'subfunctions' and 'dialog interactions' (at which level Cockburn describes goals such as 'move to next field using the tab key').
The work presented in this paper builds on Cockburn's approach. It differs in its classification of use case types; and in targeting the decomposition of use cases into «interface» and «service» sub-use cases.
The RSI (requirement/service/interface) approach to use case analysis provides a structural model for use cases that:
The RSI approach to use case analysis should be used:
Use cases are divided into three categories, shown by the UML stereotypes «requirement», «service» and «interface»:

Figure 2 - Relationship between «requirement»,
«service» and «interface» use
cases
«requirement» use cases document business processes for which automated support may be required. They detail the requirements driving the development of a system, but do not define the detail of a system's functionality. «interface» use cases provide a detailed description of the interfaces presented to the system's actors and association functionality. «service» use cases provide a detailed description of the underlying functionality a system offers in a manner independent of the needs of any particular interface. An alternative view of the relationships between the RSI use case types can be seen in figure 3:
NOTE: Enlarge the diagram below by clicking on the picture.

Figure 3 - Relationship between RSI use cases
The separation of «interface» and «service» use cases can be viewed as a layering of the functionality of a system, with «interface» use cases providing a 'translation' role between the nuances of a particular interface and the essential core of a system (see figure 4).
NOTE: Enlarge the diagram below by clicking on the picture.

Figure 4 - Separation of the functional concerns of the interface and
the core of the system
6.1. «Requirement» Use Cases
A «requirement» use case defines a business process for which some automated system support may be required (e.g. "sale of goods", "resource a course", "open a new account", etc.). «requirement» use cases may be documented in the manner described by Cockburn [2], detailing:
6.2. «Interface» Use Cases
«interface» use case describe functionality that is concerned with managing the interface between the actors of a system and the underlying services it offers. «interface» use cases undertake the role of 'translating' the information provided by an actor into a form acceptable to a set of underlying «service» use cases. To do this, they factor the elements of functionality that are more related to the interface than to the underlying system.
«interface» use cases may be documented as follows:
6.3. «Service» Use Cases
«service» use cases define the underlying functions offered by a system in a manner independent of any particular interface concerns.
«service» use cases may be specified as follows:
Two flavours of «service» use cases emerge:
The input parameters to «query service» use cases are typically used to provide a selection criteria by which sets of objects within the system will be identified. These are then returned in the output parameters. The input parameters to «update service» use cases are typically objects returned by a previous invocation of a «query service». «update service» use cases do not usually deal with selection criteria.
See figures 2, 3 and 4.
«requirement» use cases are decomposed into the «service» and «interface» use cases necessary to implement those parts of the requirement it is decided to automate. The inter-relationships between «requirement» and «interface»/«service» use cases may be shown using a «uses» trace on the use case diagram.
«interface» use cases invoke «service» use cases to gain access the core elements of the system. The two subdivisions of «service» use cases are typically used in the following manner:
8.1. Retail Banking Example
This example looks at the need for automation in the cheque clearing and inter-bank transfer aspects of a retail bank.
8.2. «Requirement» Use Case Model
Two «requirement» use cases are identified: 'processing cheques and credits' and 'inter-bank transfers'. These are documented in the following fashion:

Figure 5 - «requirement» use case model for retail
banking example
| Use case
«requirement»: "process cheques and credits" Objective: To enable clerks to process the paperwork associated with cheques and credits, entering the relevant information into the bank's systems. Steps
Extensions:
Use case «requirement»: "inter-bank transfer" Objective: To enable the reading and writing of files sent via the banking network. Steps
Extensions:
|
8.3. «Interface» Use Case Model
The following «interface» model meets the automation requirements detailed in figures 5 and 6:

Figure 7 -
«requirement»/«interface» use
case model for retail banking example
Steps 2 and 3 of «requirement» use case “process cheques and credits” are refined into the following «interface» use case description:
| Use case
«interface»:
"enter transaction details" Objective: To provide an interface enabling clerks to enter transaction related details into the system. Formats ![]() Functionality
|
Steps 2 and 3 of the «requirement» use case “inter-bank transfers” are refined to the following «interface» use case:
| Use case «interface»:
"process
inter-bank transfer file" Formats The inter-bank transfer file is formatted as follows: <Account Number>, <Transaction Type>, <Value> [,<Cheque no.>] e.g. 122312 credit 234.55 123345 cheque 1244.43 019876 etc. The 'outgoing error log' file is formatted as follows: <error-code>, <related text (from input file)> e.g. 217: input error line 234: '122341 cheque 3345.3' etc. Functionality: For each line in the inter-bank transfer file, the corresponding transaction is added to the system (using the «query service» select account by number to validate the account, and the «update service» add transaction enter the transaction). |
8.4. «Service» Use Case Model
The full use case model for the retailing banking requirements is as follows:

Figure 10 - full use case model for retail banking example
The «service» use cases are documented in the following manner:
| Use case «query
service»: "select customer by name" (in:theNameString, out:theCustomers) In: theNameString - a (possibly partial) name string which forms the criteria by which customers will be selected Out: theCustomers - set of customers meeting matching the stated criteria Objective: to return a collection of customers whose surnames match the (potentially partial) string theNameString. Pre-: True Post-: theCustomers.customers contains all customers in IBankingService.customers where theNameString[i] matches IBankingService.customers.surname[i] (where 0 <= i < length(theNameString)). Variants: None. Use case «update service»: "add transaction" (in: theTxType, theTxValue, theAccount, theChequeNo) In:
Objective: to add the specified transaction to the specified account Pre-: theAccount must be a valid account in the system ... etc. Post-: A transaction t (of the appropriate type) is added to theAccount.transactions, where t.value = theTxValue, t.chequeNo (if applicable) = theChequeNo. Variants: Other transaction types are envisaged in the future. |
Note that the «service» use cases are specified against the following specification model:

Figure 12 - Specification model for retail banking system
10.1. Separating «Interface» and «Service»
The separation of «interface» and «service» use cases is functional (although in some circumstances it may also be mirrored by an architectural split between the client and server elements of multi-tier systems), and so within the scope of the use case analysis. The separation of «service» and «interface» use cases partitions functionality into the elements that are primarily concerned with manipulating the peculiarities of an interface, and the elements that are fundamental to the system in question. The motivations for this separation are twofold: to encourage the re-use of «service» use cases (from a variety of «interface» use cases), and to enable a clear factoring out of interface concerns in the specification process.
In some cases the «service»/«interface» separation is clear-cut, most often when the actor is a human user. In other cases things are not quite so straightforward. Consider the retail banking example in section 8. A requirement exists for a file of transactions to be read and entered into the system. Is the file parsing activity a «service» or an «interface» use case? To answer this type of question consider what aspects of functionality would change if the nature or the if the interface changed. The aspects that remain constant constitute part of the «service» use case set; the aspects that vary constitute part of the «interface» use case set. Accordingly, the file parsing activity in the "inter-bank transfer" use case (see figure 9) is part of an «interface» use case.
10.2. Two Phased Approach to Use Case Analysis

Figure 13 - the RSI use case analysis process
From a process perspective, two phases of use case analysis emerge: high level «requirement» use case gathering and detailed «service» and «interface» use case specification. «service» and «interface» use case definition are undertaken in parallel, as «interface» use cases drive the definition of the set of «query service» necessary in the system.
The process of moving from «requirement» use cases to «interface»/«service» use cases involves both scoping and refinement. A decision is made as to what steps in the «requirement» use case are to be automated. These are then refined into «service» and «interface» use cases.
It is interesting to note that this process has a related parallel in the transformation of a conceptual object model into a specification model. «requirement» use cases are at the level of abstraction of conceptual object models; «service» use cases at the level of specification models.

Figure 14 - scoping and refinement of models
10.3. «Interface» Drives «Query Service» Definition
«interface» use cases use «query service» use cases to locate objects that need changing, and «update service» use cases to perform the changes. «query service» use cases provide functionality useful in ensuring the pre-conditions of «update service» use cases are met.
The set of «query service» use cases required in a system will vary depending on the exact nature of the interface. Consider two interfaces to an «update service» "delete customer". A dumb terminal interface requires the user type in the customer number, which will then be validated before deletion operation is carried out. To do this it might use a «query service» "check customer exists using customer number." Alternatively, a GUI style interface will be more sophisticated (perhaps similar to the interface in figure 8), building up lists of customers on the screen. To do this, it might use a «query service» use case such as "get all customer by name."
The RSI approach has been used successfully by Ratio Group on several projects of varying sizes. The approach was developed at Ratio Group, hence its classification as a proto-pattern. Fowler [3] discusses the difference between what he calls 'user goals' and 'system interactions' (in RSI terms - these are akin to the «requirement»/«service» split.) Cockburn [2] talks about the difference between 'dialog interface' and 'semantic interface' - perhaps akin to the «interface»/«service» split of RSI.
| [1] | Ivar Jacobson et al. - Object Oriented Software Engineering - A Use Case Driven Approach, Addison-Wesley. |
| [2] | Alistair Cockburn - Structuring Use Cases With Goals - http://alistair.cockburn.us/crystal/articles/sucwg/structuringucswithgoals.htm. |
| [3] | Martin Fowler - UML Distilled - Addison-Wesley. |
| [4] | Component Based Development and Object Modeling - Keith Short - Texas Instruments. |
| [5] | Personal discussions with Benedict Heal on the Catalysis and its approach to use cases. |
I would like to thank: Thomas Mowbray, Pete McBreen, Steven Kefford, Alan Williams, Hubert Matthews and Greg Gibson for their work in reviewing the first draft of this paper. Their comments were invaluable, and led to a substantial reworking of this paper.
Particular thanks are due to Benedict Heal, whose work had a major impact on the ideas presented in this paper.