【问题标题】:Designing a sequence diagram for an auction system为拍卖系统设计序列图
【发布时间】: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 个问题:

  1. BidSuccess=False(即公司对某项工作的竞标失败)时,他们可以选择竞标另一项工作并获胜(因此进入BidSuccess=True 分支)。是否可以在序列图上传达这一点。如果是,那怎么办?
  2. 步骤 5-13 似乎有很多冗余,这里的序列图可以更好地设计吗?我将如何合并 5,5.1,6 和 9,9.1,10 但让它们根据CustomerAcceptQuote 返回不同的结果。
  3. 也许我最大的担忧是我是否已经安装了循环/alt 防护装置。我认为我正确使用了它们,但如果不是,请纠正我。

感谢您抽出宝贵时间阅读本文。

【问题讨论】:

    标签: uml sequence-diagram


    【解决方案1】:

    ad 3) 至于你图中的loop/alt 那么它们的语义不清楚,主要是因为它们没有正确嵌套(参见http://www.uml-diagrams.org/sequence-diagrams-combined-fragment.html 示例)

    ad 2)至于冗余,您可以使用UML sequence diagram - interaction use,如

    ad 1, ad 2) 总体而言,要显示分支,同时避免冗余,而不是坚持使用 UML 序列图,您可以使用 UML 活动图的功能,如 UML interaction diagram 的示例所示

    ...交互概述图提供了控制流的概述,其中流的节点是交互或交互使用。 UML 2.4.1 规范在某些地方将这些图归类为交互图,而在其他地方,交互概述图被称为活动图的专业化......

    其实根据UML 2.4 Diagrams Overview

    ..UML 规范不排除混合不同类型的图表,例如结合结构和行为元素以显示嵌套在用例中的状态机。因此,各种图表之间的界限没有得到严格执行。同时,一些 UML 工具确实限制了在处理特定类型的图表时可以使用的可用图形元素集..


    免责声明:原始图片(不含绿色和紫色矩形)来自 Kirill Fakhroutdinov 的在线图书www.uml-diagrams.org

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多