How to show asynchronous operations on UML Activity diagram

為{幸葍}努か 提交于 2019-12-03 02:48:45

问题


I am about to draw/document for some client-server connection establishing code to better understand it. There are several operations that are done asynchronously in separate threads (connecting threads, data receiving threads, etc).

Should I show them on separate diagrams? I would prefer to have it on a single diagram to grasp overall view but don't know how to represent it on Activity diagram.


回答1:


I'm not sure if there's a correct way of doing this, I developed my own method by testing different strategies until I came up with something that worked for my own mindset.

This is how I do it:

  • Threads == Swimlanes
  • Thread Operations == Action/Activity nodes
  • Critical sections == Object nodes
  • Thread creation == Fork nodes

An example image below.

alt text http://www.freeimagehosting.net/uploads/55eaa90498.jpg




回答2:


Instead of using full arrowheads you can use half arrowheads to show an asynchronous message call. As shown



来源:https://stackoverflow.com/questions/415974/how-to-show-asynchronous-operations-on-uml-activity-diagram

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!