AN ALGORITHM TO DERIVE USE CASES FROM BUSINESS PROCESSES
Remco M. Dijkman Stef M.M. Joosten University of Twente Ordina Finance Utopics, and P.O. Box 217, 7500 AE Open University of the Netherlands Enschede, The Netherlands P.O. Box 2960, 6401 DL email: [email protected] Heerlen, The Netherlands email: [email protected]
ABSTRACT process models, and to compare these metamodels. The This paper describes an algorithm to transform business comparison of the two metamodels gives rise to a formal process models into a functional requirements mapping that forms the basis for our algorithm. In this specification, specified in the form of use case diagrams. paper we only introduce the metamodels and their formal The benefit of such an algorithm is that it helps to draw up mapping briefly. A detailed overview can be found in [6]. a functional requirements specification more quickly, The remainder of this paper is organized as follows. because business process models may be available in an Section 2 and section 3 briefly introduce use case and enterprise, while use case diagrams have to be developed business process modeling. These sections also present the by performing interviews. The use case diagrams that metamodels of both modeling techniques. Section 4 result from applying the algorithm, specify a software describes a formal mapping between the two metamodels. system that provides automated support for the original Based on this mapping, section 5 defines the actual business processes. We show this with a case study from algorithm. Section 6 explains industrial experience we practice. have with the technique. The paper finishes with some concluding remarks. KEY WORDS Business process modeling, model transformation, 2 UML Use Case Modeling requirements engineering, method engineering A use case diagram describes how an entity may use the system under development. To this end, a use case 1 Introduction diagram contains actors and use cases. An actor is an Requirements engineering is widely considered to be one entity that may interact with the system. A use case is a of the most difficult tasks in software engineering. At the set of interactions between any number of actors and the same time, errors made in this phase are among the most system under development. Thus, a use case describes a difficult to detect and the most expensive to correct [1]. part of the behavior of the system. Therefore, much can be gained from requirements An example of a use case diagram is shown in figure engineering techniques that help to produce robust 1. The ovals represent use cases, and the puppets represent requirements specifications, and speed up the actors. A line between an actor and a use case represents requirements engineering process. In this paper we the actors involvement in one or more of the interactions propose such a technique. The technique shows how use covered by the use case. case based requirements engineering [2, 3, 4, 5] may be When two use cases partly share the same behavior, improved by using business process models as this behavior may be put into a third use case, and the requirements. original two use cases may be defined to ‘include’ the We introduce an algorithm to transform business behavior of this new use case. The description of the process models into use case diagrams. The benefit of original use cases specifies the point at which to include having such an algorithm is that business process models this behavior. The goal of the include relation is to remove are often available in a company in the form of working redundancy. An include relationship is represented by a instructions or administrative handbooks. Therefore, use dashed arrow, labeled «include». case diagrams can be produced more quickly when they When one use case is a generalized form of another are developed with existing business process models and use case, we can draw a generalization relationship the algorithm than when they are developed from scratch. between them. We could, for example, draw a The approach we used to design the algorithm was to generalization relationship from the use case ‘process create metamodels for use case diagrams and for business complaint’ to the use case ‘process incoming mail’.
techniques. From this study we were able to draw up a Enter <
Figure 1. Example use case diagram Start End Actor Generalization Branch Model 1 +actor +generalization +specialization Role +responsible * * Element 1 * Task +child * 1 1 +parent +source 1 1 +destination * * +usecase +base Guard Transition Association Use Case * Include +guard
* 1 1 + include 0..1 1 1 1 +addition* +extension 1 1 +extension +base point Figure 3. Business process metamodel * +extend * * Extension Point 1..* * Extend A business process model describes the tasks that have to be carried out to reach a certain goal, and the order in +extension which these tasks have to be carried out. A task is the point smallest unit of work that makes sense to a user. Each task is assigned to a role. A role is a group of entities that have Figure 2. Use case metamodel the same rights and obligations with respect to performing Generalization relation ships can also exist between a task or a group of tasks. A role may be assigned to any actors. The actor `employee', for example, is a number of tasks, and an entity may act in any number of generalization of the actor `administrative worker'. A roles. generalization relationship is represented by a solid line In this paper, we use UML activity diagrams to model with a hollow arrowhead from the specific to the generic business processes. Activity diagrams have been shown to use case or actor. be useful for business process modeling in [11, 12]. An We may describe an extension to a use case's example of an activity diagram that models a business behavior, that is only carried out under a certain condition. process for mortgage processing is shown in figure 4. The To do this, we define an extension relation between this rounded rectangles represent tasks, and the arrows use case, and the use case that describes the extension. If represent transitions between tasks. The names in the at a predefined point (an extension point) in the execution columns represent roles, and a task in the column of a role of the base use case, a specified condition is met, then the represents that this task is assigned to that role. The bullet, extension use case is carried out. An extension relation is and the bulls eye, represent the beginning and the end of represented by a dashed arrow, labeled «extend». the business process respectively. Each use case can be described in detail, by describing We can use a guard to model a condition that must be the interactions between the actors and the system, and the met before starting the next task. A guard could be, for order in which they occur. Many description techniques example, `legal act received'. A guard is graphically exist to detail a use case. We could, for example, use state represented as a label between square brackets on a machines [7], activity diagrams [8], or informal text [9]. transition. In this paper we use activity diagrams both for describing We can use a branch to model a choice on the task that use cases in detail and for business process modeling, has to be started after the current task has finished. A because this makes the transformation algorithm branch has decision criteria attached to it that define under straightforward. which condition, which task is started. Decision criteria The metamodel of a use case diagram is shown in could be, for example, `if amount ≤ 50, start task A, figure 2. It is a simplified version of the metamodel that otherwise start task B'. Decision criteria cannot have can be found in the UML specification [7]. overlapping values. A branch is represented by a diamond with one incoming arrow and at least two outgoing 3 Business Process Modeling arrows. The outgoing arrows have guards attached to them that represent the decision criteria. Many techniques for business process modeling exist. In We can use a fork to model that two or more tasks are an earlier study [10], we studied 18 of the most referenced started in parallel (i.e. are carried out in random order) after the current task has finished. When two or more offer', for example can be a step. `Send offer and process tasks are started in parallel, we may want to wait for all reply' cannot be a step, because time passes between tasks to be finished before going on to the next task. This sending an offer and receiving the reply. Since a step is a can be achieved by using a join. A fork is represented by sequence of tasks that can be performed by the same role an arrow to a thick line, from which arrows leave to the without interruption, users experience a step as a unit of tasks that have to be started. A join is represented by a set work that is completed when it ends, after which it can be of incoming arrows to a thick line, from which an arrow performed again. Therefore, a step does describe a leaves to the task that has to be started next. complete sequence, and can be mapped to a use case. We map `Role' to `Actor', and the association between a step and a role to an association between the Administrative Worker Advisor corresponding actor and use case. Since all tasks in a step are performed by the same role, a role and a step are
Enter Client Data associated when the role is associated to any of the tasks in the step.
Enter Mortgage Data Since a step is defined as a sequence of tasks, each step forms a sub-diagram of the original business process model. Because we decided that use cases are described in Check Credit detail by activity diagrams, we can use the sub-diagrams Approve that are formed by the steps, to detail the use cases that [Disapproved] Mortgage Inform Client correspond to these steps. Also, we call the tasks that about Rejection [Approved] detail a use case: interactions, because a use case model a sequence of interactions between the system and its users. Advise Client The definition of the mapping leads to an integrated metamodel that contains both the use case and the Process Changes business process metamodel. Figure 5 shows this integrated metamodel. To keep the figure simple, it does not show include, extend, or generalization relations
Check Credit between use cases. However, these relations are part of the integrated metamodel. We chose to represent a mapping
Draw up Offer from concept A to concept B by an inheritance relation from B to A. A mapping between two associations can be represented as an OCL constraint. For example, the Figure 4. Example business process model mapping between the association between step and role, and the association between use case and actor, can be We chose to disregard the fork and join construct in represented by the following OCL constraint: this paper to simplify the algorithm. Therefore, task that context Step inv: are actually out in sequence. The fork and join construct self.association.actor → includes(self.responsible) can be added in future work. We also need an OCL constraint that expresses that steps can not contain steps: 4 Mapping context Step inv: self.contains → excludesAll(Step.allInstances) We created a mapping between the two metamodels by assessing from their definitions, which concepts or 5 The Transformation Algorithm relations in the business process metamodel map to which concepts or relations in the use case metamodel. We then From the mapping that we defined in the previous section, defined and evaluated the mapping formally [6]. In this we derived an algorithm to transform a business process section we give an informal description of the mapping. model into a use case diagram. In this section we will The mapping is straightforward, except for finding a explain this algorithm. The algorithm is based on an business process concept that maps to the concept `Use algorithm to create steps from tasks [14]. Case'. We may be tempted to map the `Task' concept to To develop the algorithm, we assume that a set of the `Use Case' concept. However, according to the UML instances exists for each concept in the integrated semantics [7], a use case must describe a complete metamodel. We also assume that a new
Inform about Rejection 7 Conclusion Figure 6. Resulting Use Case Diagram In this paper we introduced an algorithm to transform
business process models into UML use case diagrams. Third, according to its definition a use case delivers a The algorithm is based on a formal mapping between the result of value to its user. However, in the case study we metamodels of the two modeling techniques. We have found situations in which users experienced that a use shown in a case study that the application of the algorithm case only delivered a result of value when it was results in use case diagrams that can serve as a basis for combined with another use case. This situation can be further system development. solved by verifying if each use case delivers a result of The study described in this paper is related to the value to its users, and, if not, by combining it with other fields of requirements, and method engineering. Much use cases such that it does. work is done in both fields to study how models of Fourth, the choice to describe use cases that belong to different types can be generated from each other. Research the same business process in one use case diagram is done to how business processes can be described using suggests that each system is built for only one business use case diagrams [5, 7, 16]. We, however, do the process. Also, it suggests that only one system is built for opposite, and use business processes to derive use cases. each business process. However, this is rarely the case. A Eriksson and Penker describe a procedure to derive use client database, for example, is usually used by all cases from business processes that is similar to ours in primary business processes. Therefore, once a use case [15], but less detailed. diagram is drawn, we must evaluate which use cases will The use case diagrams that result from the application be implemented by which system. This decision will be of the procedure have limitations. based on what systems already exist to support other First, use case diagrams specify a typical information business processes. When we decide that a use case is system, in the sense that they do not specify control partly implemented by one system, and partly by another information that is above step level. For example, the use system, we must split up the use case. Eriksson and case diagram from figure 1 does not specify whether client Penker describe a procedure for doing this in [15]. data must be entered before mortgage data or not. Our Fifth, the algorithm does not add end states to the algorithm partly caters for this, but we have not activity diagrams that detail the use cases. To be complete, investigated this thoroughly. we should add end states to these diagrams. Second, the use case diagrams are as detailed as the
business processes from which they have been derived. A use case may, for example, contain the interaction ‘enter [8] M. Fowler, & K. Scott, UML Distilled: Applying the client data’, or the interactions ‘search client’, if the client Standard Object Modeling Language (Reading, MA: was not found ‘create new client data’. The second set of Addison-Wesley, 1997). interactions provides a more precise specification than the [9] J. Rumbaugh, I. Jacobson, & G. Booch, The Unified Modeling Language Reference Manual (Reading, MA: first set of interactions. Therefore, depending on the detail Addison-Wesley, 1999). specified in the business processes, it may be necessary to [10] W. van Dommelen, S. Joosten, & M. de Mol, Comparative perform refine the use case diagrams that result from the Study to Aids for Managing Business Processes (in dutch: algorithm further. The extend to which this is a problem vergelijkend warenonderzoek hulpmiddelen beheersing can not be assessed from one case study. bedrijfsprocessen) (The Hague, The Netherlands: Department of Finance, 1999). REFERENCES [11] G. Booch, J. Rumbaugh, & I. Jacobson, The Unified Modeling Language User Guide (Reading, MA: Addison- [1] B. Boehm, Software Engineering Economics (Englewood Wesley, 1999). Cliffs, NJ: Prentice Hall, 1981). [12] M. Dumas, & A. ter Hofstede, UML activity diagrams as a [2] A. Cockburn, Structuring use cases with goals, Journal of workflow specification language, Proc. UML 2001 Conf. on Object Oriented Programming, 10(7), 1997, 35-40. Modeling Languages, Concepts and Tools, Toronto, Canada, [3] A. Cockburn, Structuring use cases with goals, Journal of 2001, 76-90. Object Oriented Programming, 10(8), 1997, 56-62. [13] S. Joosten, G. Aussems, M. Duitshof, R. Huffmeijer, & E. [4] I. Jakobson, M. Christerson, P. Jonsson, & G. Övergaard, Mulder, An Empirical Study about the Practice of Workflow Object Oriented Software Engineering: A Use Case Driven Management (Enschede, The Netherlands: University of Approach (Workingham, United Kingdom: Addison- Twente, 1994). Wesley, 1992). [14] J. van Beek, Generation Workflow: How Staffware [5] I. Jacobson, G. Booch, & J. Rumbaugh, The Unified Workflow Models can be Generated from Protos Business Software Development Process (Reading, MA: Addison- Models, University of Twente, Enschede, The Netherlands, Wesley, 1999). 2000. [6] R. Dijkman, & S. Joosten, Deriving use case diagrams from [15] H.-E. Eriksson, & M. Penker, Business Modeling with UML: business process models, CTIT Technical Report 02-08, Business Patterns at Work (New York, NY: Wiley, 2000). CTIT, Enschede, The Netherlands, 2002. [16] S. Nurcan, G. Grosz, & C. Souveyet, Describing business [7] OMG, OMG Unified Modeling Language Specification processes with a guided use case approach, Proc. 1998 Conf. version 1.4, OMG Specification formal/2001-09-67, 2001. on Advanced Information Systems Engineering, Pisa, Italy, 1998, 339-362.