Use Cases Scenarios

User Story (US) vs. Use Cases (UC)

  • US has shorter descriptions, 
  • US are more general (less detailed) than UC
  • US focus on Who & Why, UC focus on User flow and their interaction with the systems (e.g. actor-initiated or system-initiated)
  • US has no technical detail, while UC is technical

Definition: Use Case is a sequence of actions a system that yields an observable result of value to the particular actor

  • From actors' perspective -- same group of people in the use case diagram
  • Scenario: the sequence of actions that required in each use case
  • Appropriate for situations (e.g. off-shore teams) in which implementation details are needed
  • Complicated, time-consuming to produce, hard to maintian

Relationship with other artifacts

  • 1:1:1 -- Event table activities --> Use Cases in UC Diagram --> Detailed Use Case Senarios
  • Event table Source & Destination --> Actors in UC Diagram 

Componenents

  • <Use Case Name>
  • <Summary> -- description of the use case
  • <Actor> -- an external person or external system triggering the use case
  • <Input Data> -- similar to inflow data in data flow diagram
  • <Output Data> -- similar to outflow data in data flow diagram
  • <Basic Flow> -- the "happy path" -- only one, error-free, executed 80% of the time -- good 1st MVP
  • <Alt. Flow> -- the "exception path" -- all error cases, unpredicatable, executed 1 out of 10 times
  • <Invariant> -- stay true throughout the use case
  • <Pre-condition> -- the state of the system before the use case initiated
  • <Post-condition> -- the state of the system after the use case initiated
  • <Extention Points> -- includes and extends in the use case diagram
  • <Business Rules>

Basic Flow

Always create the flow from a business perspective

Consider the business function you want to accomplish

Avoid implementation specific details

In the form of stimulus response: Actor --> System --> Actor --> System ...

Example

Alt. Flow

Supported & defined by business rules

Example 1

  • Business rule: >= 21 yrs old to rent a car
  • Happy path: I am >= 21 yrs old, I get a rental
  • Alt. path: I am 20, get a sessage that I cannot get the rental

Example 2 

Subflow

Definition: Sometimes a Use Case has several distinct cases
  • Each case is distinct and separate from the others
  • No hierarchical relationship between the cases
  • Describe the Use Case with Subflows—one for each case

Example

4. The system executes one and only one of the following subflows:
a.  If the clerk selected “Add a Product”, the Add a Product subflow is executed
b.  If the clerk selected “Change a Product”, the Change a Product subflow is executed
c.  If the clerk selected “Delete a Product”, the Delete a Product subflow is executed

 

Business Rules

  • Come from company policy
  • Dictate how buiness is conducted
  • Included to support Alt. flow

Example

Precondition

Invariants

  • Use Case: Make Payment 
  • Invariant: Actor stays authorized

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值