【发布时间】:2014-11-27 20:11:36
【问题描述】:
我目前正在为充当客户和公司之间的中间人的拍卖系统制作序列图。
但是,我在系统设计方面遇到了困难,希望得到一些指导,尤其是当我试图收紧 UML 图时。
该系统背后的整个理念是客户通过移动应用创建预订,该移动应用上传到拍卖应用,公司可以在其中竞标。如果一家公司中标,拍卖应用程序会为他们提供一个价格范围,在该价格范围内,他们可以为客户提供报价(即,如果 A 公司中标以修剪客户 X 的草坪,那么拍卖应用程序会设置 15-20 美元的价格范围对于这项工作,A公司的报价必须在该范围之间)。然后客户可以接受报价并继续工作或拒绝它。
步骤如下:
1. Customer creates a booking on booking app
1.1 Booking app saves booking (recursive as customer can save more than one
booking)
1.2 Job is uploaded to auction app where other companies can bid for it. In the
next step, a company will bid for job.
In the event of an unsuccessful bid:
2. Company makes bid for job on auction application
2.1 Message sent to company telling them that they failed to win the job
In the event of a successful bid:
3. Company makes bid for job on auction application
3.1 Message sent to company telling them that they won the job
4. Auction app sends price limit message for the job that the company has just
won (to prevent overcharging). In the next step, the company needs to set a
quote
In the event that a customer rejects a set quote
5. Company sets quote for the job that they won
5.1 Auction app sends the quote message to the auction app
6. Quote displayed to customer on mobile application
7. Customer rejects the quote
7.1 The rejection message is sent to the auction app
8. The rejection message is displayed to the company
In the event that a customer accepts a set quote
9. Company sets quote for the job that they won
9.1 Auction app sends the quote message to the auction app
10. Quote displayed to customer on mobile application
11. Customer accepts the quote
11.1 The acceptance message is sent to the auction app
12. The acceptance message is displayed to the company
13. End booking process
这是 UML 图:
我有 3 个问题:
- 当
BidSuccess=False(即公司对某项工作的竞标失败)时,他们可以选择竞标另一项工作并获胜(因此进入BidSuccess=True分支)。是否可以在序列图上传达这一点。如果是,那怎么办? - 步骤 5-13 似乎有很多冗余,这里的序列图可以更好地设计吗?我将如何合并 5,5.1,6 和 9,9.1,10 但让它们根据
CustomerAcceptQuote返回不同的结果。 - 也许我最大的担忧是我是否已经安装了循环/alt 防护装置。我认为我正确使用了它们,但如果不是,请纠正我。
感谢您抽出宝贵时间阅读本文。
【问题讨论】:
标签: uml sequence-diagram