IIBA2018 LeanUseCases
IIBA2018 LeanUseCases
User Stories
Page 2
90
Recommended Prerequisites
• Requirements Elicitation
• Small workshops
• Requirements Management
• Analysis
• Traceability
• Visual Modeling
• Context Diagrams
• Business Object Models
• Use Case Models
• Workflows
• Wireframe mock-ups
Page 3
Presentation Goals
• Pass on my experience - Share my approach
and why I do things the way I do
• Go deeper into the subject than anyone else
has in a single session
• Help you understand what is important and
what is not – information that you will need to
configure automated requirements & use case
management tools
Page 4
Style of Presentation
• This presentation is a condensed excerpt from a week
long training program
• Focus is on Use Cases & User Stories
• Style in use assumes the audience is mostly “English
as a 2nd Language”
• It is meant to also be used later as a reference
document
• There are about 100 slides – it will take a while to
cover all of this material (goal < 2hrs)
• Note that in the week long classroom version we would
be building the documents as they are being
introduced in the presentation
Page 5
Where do we start?
• Use Cases / User Stories should trace back to a Business
Requirements Document (BRD)
• The BRD should trace to the Business Problem(s) Being
Resolved
• Day 1 – write a clear statement of the business problem
being resolved
• It can be a single problem, a compound problem or list
of problems
• Important part is that you capture it
• The problem statement is also the first step in defining
the scope for a project
Page 6
Writing The BRD
• BRDs are best written in a workshop environment with
the business stakeholders
• Brainstorm solutions for the business problems and
then choose the best solutions
• Define and prioritize the list as new business
capabilities needed to implement the business solution
• Write each BRQ using business requirements style.
• Example of a BRQ:
“Our sales persons need to be able to take a customer’s
order, accept a credit card payment, and initiate an
emailed receipt, while standing in the aisle by the
product.”
Page 7
Frame the Scope - Analysis
• Work from the BRD to define the solution architecture and
new business process
• What is the new business process?
• Who is affected? Are new roles created or old roles
eliminated?
• What hardware is affected? Is any added or
eliminated?
• What software is affected? Any new? Modified?
Eliminated?
• What are the business objects involved? Any new?
Modified? Eliminated?
Page 8
Frame the Scope - Documentation
• Goal is to create:
• An executive level context diagram
• An high level architecture diagram
• An initial list of systems affected (SRS’s to write or
update)
• An initial list of use cases / user stories to write
• Start your traceability matrix – trace everything back to
the Business Requirements in the BRD
• Develop an initial project time line and prioritize activities
to bring the new business capabilities on-line in a usable
order – think “Minimum Viable Product”
• Identify where organizational change management &
training might be needed
Page 10
Define the Solution – More Analysis
• Goal is to create:
• Solution Requirements Specifications (SRSs)
• Refined Architecture Diagram
• Refined list of use cases / user stories to write
• An SRS should exist for each application
• Define the system wide user requirements (more on
this later)
• Define the performance expectations for each
application – quantity of simultaneous users, response
speeds, MTTM, MTTF, etc.
Page 11
Parallel activities that should be occurring
• Create:
• Personas for Actors - if needed
• Business Process Workflows - as needed
• Business Object Diagrams
• State Diagrams – as needed
• Actor <initial> Permissions Matrix
• Use Case Diagrams
• Update Traceability
• Finalize SRS’s
• Look for opportunities to simplify, combine, eliminate, or
automate user steps – Consider a brainstorming session
with team for this
Page 12
80
Example of Context Diagram
13
Page 13
Benefits of the Context Diagram
14
Page 14
Example of Business Object Model
15
Page 15
Benefits of Business Object Modeling
• Shows dependencies
• Supports the database modeling
• Supports the UI modeling
• Shows where the use case operations exist
• Shows the important attributes of each object
• Supports system segmentation
16
Page 16
Example of a Workflow Model
Process Films
Film Studio
1.0
Reviewer
Broadcast
Receive Link to Review Ready to Publish
Yes New Film Review
New Film New Film Publish? New Film Review
Available
Receive notification
Read Has Read New
of
New Film Review Film’s Review
New Film Review
6.0 7.0
17
Page 17
Benefits of Workflow Modeling
18
Page 18
Example of Use Case Model
19
Page 19
Benefits of Use Case Modeling
20
Page 20
Experience Note
• It is a rare thing to identify all of the use cases at this point
• Thoroughness will reveal most of them
• Finding all (perfection) can be time consuming
• Knowing you have found all can be impossible
• As you dig deeper, you might find:
• Some use cases are not needed
• Some use cases need to be divided into multiples
• Some use cases need to be combined into one
• Expect changes to your object and use case models
• You will discover things that were not obvious the first time
• Your users will discover things that they had not thought of
previously
Page 21
The Big Picture
Business
Requirements
Document (BRD) – Solution
Solution
Requirements
executive level list Solution
Requirements
Specifications
of desired new Requirements
(SRS)Specifications
– What each
business capabilities Specifications
(SRS) – What each
solution Architecture &
(SRS) – What each
solution Designs –
application must
solution
application
do must Decisions on how
application
do must Software Code
the application will
do be built to meet
the requirements
Use Case (UC) /
UseStory
User Case(US)
(UC) /
Use
User Case
Story (UC) /
– What
Use a (US)
Case (UC) /
User
– Story
What a (US)
featureUse
must
User Case
Story (UC) /
(US)
– What
feature Use
must a
Case (UC) /
doUser
– Story
What
Use a (US)
Case (UC) /
feature
doUsermustStory (US)
–
featureWhat
must a User
doUser
– WhatStory
a (US)
feature
do Use
Requirements
must
– What Complex products can require multiple
feature
do Casemusta(UC) /
feature
User must
do Story (US) – SRS’s – Plan for one SRS and one Use
Whatdoa feature Case / User Story Set per Application
must do
Page 22
70
What is a Use Case?
Page 23
What is a Use Case?
• “Uses” are operations that will be occurring
repeatedly
• It is always an action to accomplish a result
• It is usually a sequence of actions (a scenario)
• “Each use case should do one thing well” – per
Alistair Cockburn
• A complex product can have hundreds of use
cases
• Learn to write them quickly and collaboratively
• Write only the ones that are needed to build the
product
Page 24
Use Cases vs. User Stories?
• If written well, they are essential the same thing
• They both:
• Tell the goal for an actor
• Describe the action needed to reach the goal
• Provide just enough details to build and test the
product
• They are both written in phases
• First the title, description and pre-conditions for
backlog tracking and prioritization (front of the card)
• Then later the scenario details and acceptance
criteria to define the finished expectations (back of
the card)
Page 25
The Lean Use Case – Typically 3 Pages Long
Title, Description, Preconditions,
Triggers, and Scenarios on
PAGE 1
Storyboard on
Lean Use Case
PAGE 3
Example
Page 26
Suggested Automated Format
Title: <verb> <noun>
Scenarios:
<Main>, <alternate 1, 2, 3…>
Acceptance
Criteria:
<Criteria 1, 2, 3….>
Supplemental
<Attachment 1, 2, 3….>
Info:
Page 27
Or….
Title: <verb> <noun>
Page 28
Why Create the Use Cases?
• Use cases provide an easy way to see the business
processes from the user’s point of view
• They show the one best way vs. just any way
that works
• Use cases contain all of the “front end” effort that is
needed to get a product design started – they are
not extra work!
• They also contain:
• The business’s formulas
• Business rules
• Data validations
Page 29
Why Create the Use Cases?
• Use cases become highly valuable when working in dispersed
teams with parallel efforts
• They are the basis for:
• User manuals
• On-line help
• Built-in help
• Test scripts
• User acceptance testing
• Call center support
• More?
• Use cases contain the “acceptance criteria” to support
Test Driven Development (TDD) – one of the best lean
techniques for software development
Page 30
Which Use Cases are needed (CRUD)? CRUD:
•Create
• Delete? – only three scenarios really exist •Read
• Delete with no undo
•Update
• Delete but allow undo
• Delete but warn me first
•Delete
• Describe these delete scenarios in your SRS
• View? – isn’t it just the Edit but read only?
• Create? - isn’t it just the Edit but the first time?
Page 31
Which Use Cases are needed (Epics)?
• Epics are often just a set of lower level use cases being
combined to tell a workflow story as a higher level use case
• Example: “Shop On-Line” Epic Use Case contains:
• Sign In
• Find Products
• Add Product to Shopping Cart
• Check Out
• Review Cart Contents & Pricing
• Choose Shipping Method
• Pay Invoice
• Sign Out
• Epics are better depicted as process workflows showing
how the lower level use cases chain together
Page 32
Use Case Structure
Page 33
Use Case Titles
Page 34
60
Business Use Cases vs. System Use Cases?
Page 35
So how do we find the use cases?
• Start with the BRD
• Identify the Actors (People or Systems), Business
Objects (Nouns), and Actions (Verbs)
• Give names to business objects. Ex:
• Sales Order
• Customer’s Account
• Customer’s Postal Address
• Credit Card Receipt
• Identify what actions can be performed on a
business object. Ex:
• Create, Update, Delete a Sales Order
Page 36
Perform Use Case Discovery for an
Existing Product
• Start the application
• Step through all options and screens
• Record actors, actions, objects, and major
attributes
• Ignore exception & confirmation messages
• Watch for implicit actions where one operation
has enabled another
• Remember that launching the application is also
an operation (commonly missed)
Page 37
Explore all Options
Page 38
Example of Discovered Use Cases
Actors Operations Business Object Attributes
Reader, Writer Launch Application Document, Menu
Reader, Writer “Exit” Application
Writer Create "New" Document Document Name, Location
Reader, Writer "Open" Existing Document Document Name, Location
Writer "Save" Document Document Name, Location
Writer "Save As" New Document Document Name, Location
Writer "Page Setup" Page Paper Size, Margins, Orientation, Header, Footer
Reader, Writer "Print" Document Printer, Pages, Number of Copies
Writer Edit Document Text
Writer "Cut" Text
Writer "Copy" Text
Writer "Paste" Text
Writer "Delete" Text
Writer "Find" Text Search Criteria
Writer "Replace" Text Search Criteria, Replacement Text
Writer "Select All" Text
Writer "Undo" Text Text prior to current edit
Writer Insert "Date & Time" Text Date, Time
Writer Select "Font" Text Font, Style, Size, Script
Writer On/Off "Word Wrap" Text Wrap Text, Don't Wrap Text
Reader, Writer Get "Help" Help Topics, FQAs, Step by Step Instructions
Reader, Writer View "About" Application Current Version, Copyright, License
Page 39
Experience Note
Page 41
Create a brief description for each use case
Page 42
Table of Contents?
Page 43
Use Case Relationships?
• Some books say you should document the
relationships to other use cases:
• Includes
• Included in
• Extends
• These are essentially pointing to where the use cases
fit in the future state process workflow
• Is this data really needed in the use case? – or is it
redundant
• Does it add enough value to justify the extra work to
include and maintain?
Page 44
50
“Extends” Use Case?
• Some books say “Extends” is a special relationship that
adds additional features to an existing use case
• Popular example is the scenario for the advanced users
verses the novice users
• Rather than creating an “Extends” use case:
• Create an alternative flow for that actor’s goal, or…
• Create a separate use case for that actor
• Think, if it's really permissions based, add it to your
permissions matrix and write one use case for an actor
who has all permissions
Page 45
Why Track Revisions?
I will use a revision record if I think the project will need that level
of formality or CYA – otherwise I let the file date do the work and
show revisions as strikeouts for deletions and red font for additions
Page 46
Actors List?
Page 47
Pre-Conditions & Trigger
Page 48
Post-Conditions?
Page 49
Front Side of the User Story Card
Page 50
Top of Page 1 in the Use Case
Pre-Conditions:
• Actor is Signed In
• Actor’s Customer Profile exists
Triggers:
• Actor has chosen to edit the postal address in their
Customer Profile
Film Review
Title:
Genre:
Rating:
Length:
Release Date:
Abstract:
Save Cancel
56
Page 56
Benefits of Screen Mock-Up Modeling
• A visual story of the workflow emerges
• Business attributes and operations become clear
• Scope of work for user interface becomes clear
• Draw out missing:
• Requirements
• Business objects
• Attributes
• Operations
• Business rules
Page 59
Why have the Scenario?
Page 60
Experience Note - Usability
• Ever heard of Therbligs?
• They are a set of flow chart symbols for defining work at a level
below BPMN flow charting
• Steps include physical and mental actions like:
• Find (locate keyboard – cursor prepositioned)
• Use (enter log in name, tab, enter password)
• Find (find the mouse)
• Transport Empty (move hand to mouse)
• Grasp (grasp the mouse)
• Transport Loaded (move mouse)
• Find (locate destination – log in button)
• Position (use mouse – onto log in button)
• Use (click mouse)
• Release Load (remove hand from mouse)
• Unavoidable Delay (wait on response) 1950
• Think (implicit to all Therbligs)
Page 62
System Actions
• Look for the activities in the process that have been or
will be automated:
1. Validate input data is correct
2. Look up prices for items in cart
3. Calculate total price
4. Apply discount based on customer’s rating
5. Apply taxes based on tax rules
6. Calculate total amount due
7. Store invoice as a pending sale
8. Present invoice for review
• System actions are often ordered
•Number ordered steps
•Bullet non-ordered steps
Page 63
Writing Use Cases - Language
Page 64
30
Use Case Main Scenario - Example
Main Flow: Edit Postal Address Details
Step Actor Action System Response Notes QA
Page 65
Writing the Scenarios
• Ignore the planned UI screens when you are thinking about
the fewest steps
• The UI Designer might use several screens to do what you
define in one step
• Define subtitles for attributes that must stay together
• Think about what data is needed before the next step can
be executed (the workflow breakpoints)
• The UI Designer might add interim saves for long list of data
• Example:
1. Actor enters their Medical History and confirms when done
2. System validates and saves the data
• Designer decides to break the data down into sections and
add a save operation for each section
Page 66
Experience Note
• Use cases should address only the “direct” user scenarios
and business rules to reach a goal
• Use cases should ignore the “indirect” scenarios:
• What if I exit the app now?
• What if I have opened a search but then went back and edited
my search criteria before selecting anything in my search?
• If rule 1 says this and rule 2 says that, what should my result
be?
• What if, what if, what if ….
• These indirect scenarios are examined by the Solution
Designers in their analysis activity as their first step in
creating their design
Page 68
Writing Use Cases – Data Validation/Filtering
Page 69
Exception Flows:
Actor Action System Action Notes Q
A
1 Has not entered any data in Street Line 1. Highlight Street Line 1 text box in red and block At least 1 printable character must be □
user from leaving screen entered in Street Line 1.
2 Street Line 1 has exceeded 254 characters Stop accepting characters after 254 are entered □
3 Street Line 2 has exceeded 254 characters Stop accepting characters after 254 are entered □
4 Has not entered a City. Highlight City text box in red and block user from At least 1 printable character must be □
leaving screen entered in City.
5 City has exceeded 254 characters Stop accepting characters after 254 are entered □
6 City includes numbers or special characters Remove all numbers and special characters Added “’” and “-” to accommodate cities □
except “’”, “-”, and “ “ from entered text string like Hart’s Landing and Winston-Salem.
6 Has not entered a State/Province. Highlight State/Province text box in red and block At least 1 printable character must be □
user from leaving screen. entered in City.
8 State/Province has exceeded 254 characters Stop accepting characters after 254 are entered □
9 State/Province includes numbers or special Remove all non-alpha characters except “ “. “ “ is needed for many state and province
characters names □
10 Has not entered a Country. Highlight Country text box in red and block user At least 1 printable character must be □
from leaving screen entered in Country.
11 Country has exceeded 254 characters Stop accepting characters after 254 are received □
12 Country includes numbers or special Remove special characters except “’” and “-” □
characters from entered text string.
13 Has not entered a postal code. Highlight Postal Code text box in red and block At least 1 printable character must be □
user from leaving screen entered in Postal Code.
12 Postal code has exceeded 254 characters Stop accepting characters after 254 are entered □
Page 73
Supplemental Information – Page 3
Supplemental Information
Storyboards
Note that these storyboards do not depict the final user interface look &
feel. See the SRS for those details. These storyboards do list the fields,
labels, and operations that must be presented to the user.
Customer Profile – Postal Address:
Customer Profile
Street Line 1
Street Line 2
City
State/Province
Country
Postal Code
Cancel Done
Page 75
Tool Tips?
• What about tool tips? – those “helpful messages that pop
up when you hover your mouse over something on the
screen”
• Tool tips are most closely related to the user interface
• Controlling the words and spelling can be important
• Supports text readers used by blind persons
• Tool tips can be defined in a table within the
“Supplemental Information” section of a use case:
• Trigger – the object on screen that the tool tip tied to
• Tool Tip – the tool tip message
• Notes - any relevant notes
Page 76
Right click menus?
• What about right click menus? – those “helpful menus that
offer alternate actions to be performed”
• Right click menus are most closely related to the user
interface - they provide “advanced” options to the user
• Right click menus can be defined in a table within the
“Supplemental Information” section of a use case:
• Anchor – the object on screen that the menu is tied to
• Options – the list of operations that can be invoked (assume
actor has all permissions)
• Notes - any relevant notes
• Some operations may require their own use cases
• Some operations may invoke operating system
operations. Ex: Copy, Cut, Paste, Find <File>, Save-As
• Since their behavior is “built in” – no use case should
be needed
Page 77
Data Pickers
• What about drop down data pickers? – those “choose one
value from many” operations
• Determine if the list of values is fixed, configurable, or
dynamic
• For a fixed list, insert the values directly in the use case
scenario
• Consider separate use case or scenario for each value
if the fixed value chosen causes a change to the
workflow
• If configurable, write a use case for configuring the list and
refer to the list by name only within the use case – do not
mention the values. Ex: list of countries
• If dynamic, refer to the list by name only within the use
case – do not mention the values, use the list name
instead. Ex: Choose from the list of available sizes/colors
Page 78
Tables
• Best to describe them as “Lists”. Ex: The List of Products
• Include the major attributes (column headings)
ex: Presents the list of products with includes:
Product Name
Description
Price
• Tables often can be user configurable to sort up, sort
down, hide columns, reveal columns, etc.
•These behaviors are often best described in the SRS if they
are the same for every place the table element is used
• However, the initial settings may be unique to the use
cases and should be listed there – in notes for scenario or
in supplemental information. Examples:
•Sort by most current to oldest “last edit date”
•Set “Created by” and “Create date” as hidden
Page 79
Hot Keys
• What about Hot Keys – those short cut key combinations
• Hot Keys are often best defined in the SRS
• Avoid overwriting the operating systems’ built in hot keys
• Sometimes defining them in the use cases makes sense
• Make a note in the SRS to indicate if a list there is not
comprehensive.
Page 80
Data Mappings
• I will sometimes include a data mapping table:
• Source of record
• Name at source
• Format at source
• Destination of record
• Name at destination
• Format at destination
• This helps with testing, ETLs, and DB design
• Building a master data mapping spreadsheet is also a
good solution – point to it in the notes
Page 81
Other Special Situations
• Operating System Errors – these are out of your
control and can be different system to system.
• Purchased Applications – these do not need use
cases unless you are writing the requirements to
have a purchased application created.
• System to System Actions – I have found an API
Interface Specification Document to be the leaner
choice.
• Toggle Cases – If truly a binary situation, make one
the main flow and one the alternate flow – this is still
a lean approach, unless the scenarios get complex
Page 82
Writing Use Cases – Do’s & Don’ts
• Do not create use cases for one time tasks – use cases are
for repeating actions the actors perform.
• Do not try to implement screen behaviors in use cases
• Do describe things only once - Point back to it if you need it
again
• Do not describe “cancel” or “exit” within your scenarios -
Assume those options are available at every step and are
defined in the SRS
• Do not put in features that will be supporting multiple use
cases – those go in the SRS
• Ex: Behaviors for displaying special fields like email addresses,
dates, SSN, URLs, etc.
• Do describe only what is needed for the scenario of interest
• Do spell out words and define abbreviations
• Be consistent on attribute names!
Page 83
Writing Use Cases – Non-Technical Words
• Avoid describing the UI or hardware elements
• Use words like “chooses” rather than “clicks” or “taps”
• Systems “present”, “display”, “calculate”, “determine”,
“validate” and “save” data
• Users “select” or “choose” items, “enter” data, “save” or
“confirm” transactions, and “navigate to” other activities
• Tabular Data is often presented as a “the List of …”
• Give unique titles to sets of data like “Customer Master
Data” rather than referring to a “screen” or a “form”
• A use case should withstand the test of time
• It should not require changes as technology or software
language changes
Page 84
10
Writing Use Cases – Common Notations
Page 85
Experience Note
Page 86
Experience Note
• The use case represents a contract between the users and
the designers
• Like any contract, changes can still occur
• People will continue to want the product to be its best
• Users will think up more as they continue doing their jobs
• Designers will think up more when they “put pencil to paper”
• The use case peer review is the one of cheapest places in
the process to accept changes
• The initial draft is the cheapest place
• The next validation point will be the design review where the
cost is still relatively low
• Changes suggested when the coded product is reviewed will be
much more costly and should be avoided
• Do whatever you can now to avoid later changes
Page 87
The Lean Use Case
Title, Description, Preconditions,
Triggers, and Scenarios on
PAGE 1
Storyboard on
Lean Use Case
PAGE 3
Example
Page 88
What makes an Lean Use Case Agile?
Page 89
After you have written user stories / use cases
Page 90
Flexibility to changes
Page 91
Flexibility to changes - continued
• Your Product Manager or Subject matter
Expert should be in concurrence with all
changes – It’s their product!
• To be agile, use of a formal change control
process for use cases in development is not
recommended
• Start formal change control upon deployment
of the feature
Page 92
Next Steps
• The Solution Designers will now do their magic by
taking the use cases / user stories and evolve
them toward a finished product
• The use cases / user stories are the requirements
for the designers
• Maintain the use cases / user stories as the product
evolves
• The designs will contain more detail that the use
cases
• Designs inherently address additional system rules to
assure the results occur without error
• Conduct a design review before starting the coding
• Make sure your code is well commented – it will be
the de facto blueprint going forward
Page 93
Recap
Page 94
00
Questions?
Page 95