我目前正在为一个拍卖系统绘制一个序列图,该系统充当客户和公司之间的中间人。
然而,我在系统的设计上有困难,希望得到一些指导,特别是在我试图收紧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图:

我有三个问题:
BidSuccess=False (即公司对一份工作的投标失败)时,他们可以选择投标另一份工作并获胜(因此进入BidSuccess=True分支机构)。能否在序列图上表达这一点。如果是,那怎么做?CustomerAcceptQuote返回不同的结果。谢谢你抽出时间阅读这篇文章。
发布于 2014-10-03 17:33:49
ad 3)对于图中的loop/alt,它们的语义不清楚,主要是因为它们没有正确嵌套(参见http://www.uml-diagrams.org/sequence-diagrams-combined-fragment.html中的示例)。
ad 2)对于冗余,您可以使用UML序列图-交互使用,如

ad 1,ad 2)总体上显示分支,同时避免冗余,而不是坚持使用UML活动图中的特性,如UML交互图示例所示。
...Interaction概述图提供了控制流的概述,其中流的节点是交互或交互用途。UML 2.4.1规范在某些地方将这些图降级为交互图,而在其他地方,交互概述图被称为活动图的专门化。

实际上根据UML 2.4图表概述
..规范并不排除混合不同类型的图(),例如结合结构和行为元素来显示嵌套在用例中的状态机。因此,各种图表之间的边界没有严格执行。同时,的一些工具限制了一组可用的图形元素,这些元素可以在处理特定类型的图表时使用。
免责声明:原始图片(没有绿色和紫色矩形)来自基里尔·法赫鲁德诺夫的在线书“www.uml-diagrams.org”
https://stackoverflow.com/questions/26167586
复制相似问题