How to show asynchronous operations on UML Activit

2019-03-08 12:01发布

问题:

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