具有可变并发流数的UML活动图 [英] UML Activity Diagram with variable number of concurrent flows

查看:96
本文介绍了具有可变并发流数的UML活动图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在UML中,发生并发流数量可变的情况时,我感到很挣扎。一个简单实用的现实生活场景是POOL乘车共享服务。对于第一个车手来说,整个流程似乎很容易。但是,一旦第一个骑手进入汽车,而驾驶员接上第二个骑手,则变得很难在图表上显示,因为现在骑手1和骑手2是并发流,并且这些并发流的数量始终是可变的,介于0和数字之间



对这种行为进行建模的最佳UML图类型和技术是什么?我该如何解释和描述流向观众的并发流量的可变数量?以便将有关线程/类/对象的特定详细信息排除在外。



这是我的尝试:

解决方案

这里是另一种方法,该方法在活动图上显示灰色的并发流程,但同时添加了额外的活动/状态图以显示驾驶员的观点。最重要的是,我添加了信号,因为它们应该描述异步活动。



但是,我担心并发流仍然会造成混乱。在最简单的情况下,将是: 1个服务器 1个驱动程序(驱动程序应用程序)和多个骑手(骑行应用程序)。活动图上显示的内容表明存在多个驱动程序(驱动程序应用程序)!




I'm struggling with modeling in UML a scenario where variable number of concurrent flows occurs. A good and simple real life scenario would be a POOL ride-sharing service. For first rider whole flow seems easy. However once first rider is in a car and driver picks up second rider, then it becomes difficult to show on diagram, as now rider 1 and rider 2 are concurrent flows, and number of these concurrent flows will always be variable, between 0 and number of maximum seats in a car.

What's the best UML diagram type and technique to model such a behavior? How do I explain and depict variable number of concurrent flows to the audience?

Audience is rather non-technical, being upper management / finance, so I would like to keep specific details about threads/classes/objects out of the picture.

Here is my attempt:

解决方案

Here is another approach that shows grayed out concurrent flow on activity diagram, but also adds extra activity/state diagram to show driver's perspective. On top of that I added signals as they are supposed to depict asynchronous activities.

However I'm afraid that concurrent flow might still be confusing. In simplest scenario there would be: 1 Server, 1 Driver (driver app) and multiple Riders (rider apps). What's visible on the activity diagram suggests that there are multiple Drivers (driver apps) instead!

这篇关于具有可变并发流数的UML活动图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆