Use case modelling can be done in multiple ways. One of the standard processes is known as Rational Unified Process (RUP), this process is put forward by Rational Inc., now under Oracle.
In this article, I am going to suggest a process, which I used in my projects in various software companies. As per this process, the steps involved are as follows, these steps are for complete system analysis and design using UML models. However, in this article, we will look at only use case modelling steps:
- Understand the business domain, context and needs
- Conduct Stakeholder Analysis
- Interact with stakeholders to understand stakeholders needs
- The following steps are conducted iteratively:
- Find structural elements/functions – functional decomposition
- Use cases identification & create use case model
- Identify scenarios
- Create activity diagrams
- Create sequence diagram, if needed
- Identify classes and build logical data model
- System design
- Coding
- Testing
- UAT
- Go Live
Step1: Identify actors
The first step is to identify the actors from the given requirements. Actors are external entities, who interact with the system, to be developed. All the nouns used in the requirements could be actors. In our case, the possible candidates for being actors could be:
- Passenger
- Passengers with age <= 4 yrs
- Passengers with special needs
- Group of passengers
- Check-in clerk
Identification of actors is an iterative activity, where we can refine the selection of actors. If you look at the actors' list, you can see that there are multiple types of passengers. This means that an actor namely Passengers has related actors. The actors can be shown as shown below:
Step 2: Identify use cases
Once we have identified actors, we can focus on the interactions of the actors with the system. In our case of the airline system, we can identify the following use cases:
This functional mapping is an excellent way of functional decomposition as well as identification of use cases. Based on the above functional map, we can go ahead to create the use case model. A detailed use case model is shown below:
The use cases are kept within the system boundaries with proper “Include” and “Exclude” relationships.
If you want to brush up on your basics of Use cases and UML, you can read this blog: What Is Use Case Basics & Diagrams?
Step 3: Identify scenarios
Once we identify the use cases and build the use case model, the next step is to identify scenarios. The scenarios add details to the use case model. Scenarios also help in identifying business processes and creating activity diagrams.
Typically speaking, every use case may result in one or more scenarios. However, it’s not mandatory to make activity diagrams for each of the use cases. Every model diagram is created only if it helps in understanding the system better.
Scenarios can be of two types:
- Success scenario, when everything works fine
- Error/Alternate scenarios
Let’s see the scenarios for the check-in process:-
Success Scenario: Check-in process getting completed without any issues
- Individual puts the baggage for check-in and stickers
- Shows the ticket to the booking clerk at the booking counte
- The booking clerk enters the PNR number and verifies the data
- The booking clerk asks for an ID card and verifies
- The passenger puts the baggage and the weight is checked by the booking clerk
- The baggage stickers are printed and attached to the baggage
- The boarding pass is issued to the passenger
Alternate Scenario: Check-in process for Individuals having special needs
- The booking clerk enters the PNR number and verifies the data
- Identify the passengers with “Special needs”
- An alert is sent to the customer service desk
There are other alternate scenarios in this case, I am not writing the steps for them. You can try that as exercise.
i. Alternate Scenario: Baggage weight > Allowed limit
ii. Alternate Scenario: Valid ID card not available
iii. Alternate Scenario: Passenger checks in using Kiosk Having identified the scenarios, the next step is to create the activity diagram.
Step 4: Creating activity diagrams
The activity diagrams can be created on the basis of identified steps and scenarios. You can use a tool to create the activity diagrams or use Microsoft Word or Powerpoint as well.
For our case study, the activity diagram is:
This is a type of case study, which are part of all of our business analysis courses, where we help participants to do it themselves so that they can get hands-on experience.