| |
|
Certification of Software Engineers Litigation of Software-Intensive Projects O-O-Design: ganz einfach oder sehr kompliziert? Professionalism in Software Engineering Reusing the Products of Analysis UML: A Curse or Blessing? (pdf file) Wer verträgt wieviel Abstraktion? Wohin mit den Funktionen im Objektmodell?
|
Requirements Patterns via Events / Use Casesby Suzanne RobertsonAbstract Note 1: the terms event (reference McMenamin and Palmer '84) and "use case" (Jacobson '92) are used to mean the same thing. I acknowledge that there are some differences in application and notation, but for the purpose of identifying and using process patterns the models are interchangeable. Note 2: all references to "system" refer to all the system's processes (computerised, manual, mechanised) not just the processes that are computerised. Keywords: requirements pattern, event, use case, requirements analysis. What is a Requirements Process Pattern?
Notice that in order to carry out its processing policy in response to this event, the system needs to have access to stored information about: Customer and Book and the system records some information about Back Order and Invoice. The system also needs access to the physical books on the Bookshelf. In order to understand more details of the system's processing policy we can trace the event response/use case through the system and identify the individual processes. The more detailed event-response process model in Figure 2 shows us that the Order For Book is input to the Check Customer Credit process. The process uses the stored Customer Credit Status to produce either a Refused Book Order, which goes back to the Customer, or Approved Book Order, which is input to another process in the system. The event-response continues to trigger processes within the system until all of the ripple effects either stop at a store of data or return to the customer.
The model is made more precise by defining all of the terms that are used and by specifying the detailed processing policy for each process. For example, Order For Book could be defined as a flow of data containing:
Similarly, Customer could be defined as a store containing the following information for each Customer:
The definition process continues until each elemental term is defined:
The processing policy for Check Customer Credit could be specified as:
The processes, interfaces and stored data components of this event-response/use
case model are a specification for how this particular system responds to
the event: Customer wants to buy a book. Now suppose that we have
built other event/use case models for similar events in other systems. Then
we could use those event/use case models as the raw material for discovering
a reusable requirements process pattern. Similarities and Differences
This system is dealing with the supply of consulting services. At first
glance the supply of consulting services has very little in common with
our previous example which is filling book orders. However we can discover
many similarities by making abstractions. In the first example the subject
matter is concerned with supplying books to customers. In the second example
we are supplying services to customers. So look at the two process models
and ask the questions: what similarities are there between books and consulting
services? Your answer might be something along these lines: Making Useful Abstractions
Determine Book Availability checks to see if the book is in stock and if it is then the book is available to fill the order. If the book is out of stock then, providing it is still in print, the Create Back Order process creates a back order for the book. Determine Service Availability checks to see if there is a consultant available to provide the service when the customer wants it and if there is then the consultant is scheduled. If there is no consultant available then Create Alternative Schedule produces an alternative schedule which is offered to the customer. By abstracting from the above description we can build an event response/use case model that abstracts the similarities and specifies the differences between the two sample events.
We discover that some parts of the event response have the same pattern regardless of whether we have a goods product or a service product. Check Customer Credit behaves the same way for a book order, a stationery order, a consultancy order or an order to fix the plumbing. Other parts of the event response vary depending on the type of product with which they are concerned. For instance, Find Alternative Product produces a back order in the case of a goods-related product. However a service-related product requires a response that looks for alternative ways of scheduling the service that the customer has requested. These variations in response depending on product type can be specified as alternatives within the pattern's description of the individual process. To become good at making useful abstractions you need to be able to classify the same subject matter at different levels of importance. This is easy to say, but is difficult to do. If you know a lot about a subject a natural tendency is to think of the world in terms of that subject. This tendency makes it difficult to see similarities between seemingly disparate subjects. However, if you are building event/use case models in a consistent way, you can use this consistency to help you to make useful abstractions by looking for similarities between models. Some characteristics to consider are matching of:
The more consistency you employ in your approach to specifying events/use cases the more potential exists for automated identification of similar characteristics. The point of making the abstraction is that the requirements process
pattern could be used as the starting point for any system that receives
orders from customers. The pattern makes it possible to use detailed knowledge
that has been analysed, specified and refined by many other requirements
engineers. Connection with Data Patterns
Rather than building one gigantic, unmanageable data model, we can use event/use case partitioning and build a data model to support one event/use case. This is similar to the approach we take when we build individual process models for each event/use case. The event response/use case model in Figure 1 shows the processing that takes place in response to the event: Customer wants to buy a book. Figure 6 is the data model for the same event. This model specifies the business entities and relationships that must exist in order for the system to respond to the event. For example the model shows us that a Book has an Ordering relationship with Book Order. The model also tells us that an instance of a Book can participate in an Ordering relationship with N (many) Book Orders and that a given instance of a Book Order can participate in an Ordering relationship with many Books. Figure 7 is another example of using the event/use case partitioning to build a data model that focuses on the data for one event: Customer wants to buy a consulting service
The data models are a static view of the entities and relationships. The process models contain details of the creation, referencing, updating and deletion of the entities and relationships. In Figure 1 we see that process 1: Check Customer Credit references a store of the Customer entity to find out the Customer Credit Status. We can also see that under some circumstances, described in the process specification, the process creates a New Customer. Other processes that have their own reasons to being interested in the Customer entity will specify those details in their individual process specification.
The process model contains definitions of the stores that are accessed by processes.
The store Customer on the process model is equivalent to the entity Customer on the data model, so the same definition supports both the process and data models. The more we know about the details of an event response, the better we
are able to specify a more abstract pattern that will be helpful in a variety
of circumstances. The data model in Figure 8 is the result of abstracting
the data models for Customer wants to buy book and Customer wants
to buy consulting service.
The model shows us that a Service Product and a Goods Product share the characteristics defined in Product, and that all Products can participate in the Ordering relationship with Order. However the Service Product and the Goods Product have their own unique relationships. We could use this model as a pattern for any event/use case when a customer wants to buy any type of product. Storing Your Requirements Process Patterns
Here is an example of using the template to record the requirements process pattern for Customer wants to buy a product
This event/use case data model defines the entities and relationships within the context of this event:
Selecting and Using Process Patterns
The stages you go through (defined in detail in Robertson 1994) are:
By using the event/use case as a pattern cataloguing tool and as a project partitioning tool you can progressively build up your pattern catalogue and access the appropriate patterns for your project. One benefit of this approach is the time you save by avoiding re-analysis and re-specification of processes that you have already analysed many times before. This is a considerable saving when you consider how long it takes to analyse and specify all the processing details for an individual event/use case. Another benefit is earlier and more relevant feedback from users. You can use an event/use case process pattern as the starting point for requirements analysis. Tell the users that the pattern is a general statement of one of their business events. Walk the users through the model and ask them to tell you about the differences between their business policy and the pattern. The pattern acts as a prototype and helps to generate feedback that would normally take many sessions to discover.
Conclusions
References
Gause, Donald and Gerald Weinberg, Exploring Requirements - Quality Before Design, Dorset House, New York, 1989.
Hayakawa S.I, Language In Thought and Action, George, Allen & Unwin Ltd., London, 1970.
Hay, David C, Data Model Patterns, Conventions of Thought, Dorset House, New York, 1995.
Jacobson, Ivar et al. Object-Oriented Software Engineering - A Use Case Driven Approach. Addison-Wesley, 1992.
McMenamin, Steve, and John Palmer. Essential Systems Analysis. Englewood Cliffs, N.J.: Prentice-Hall, 1984.
Robertson, James and Suzanne, Complete Systems Analysis: the Workbook, the Textbook, the Answers, Dorset House, New York, 1994.
Robertson, James and Suzanne, Mastering The Requirements Process, The Atlantic Systems Guild Ltd., London, 1996.
Robertson, Suzanne and Kenneth Strunch, Reusing The Products of Analysis, Second international workshop on software reusability, Position paper, IEEE, Lucca, Italy March 24-26, 1993. Contains a case study of how requirements patterns were built and used in the insurance industry.
|