Articles, Blog, ,

Example Activity Diagram

Example Activity Diagram


Here’s an activity diagram you can think of it executing as follows. Imagine that you had some token that you could lay on top of any of the states on the diagram. It would come in at the start at the top where there’s the filled in circle, and it would move along the horizontal line to get to the first state. And then it would move downward to the diamond. At which point it would split. That is, we’d have two tokens. One going over to the right and one going downward. The one on the right can continue downward again and finally coming into the diamond near the bottom. The second token from the top goes straight downward and is thwarted by the horizontal, the heavy, black horizontal bar that’s there. This is a synchronization point. In this case there’s nothing to synchronize with, but there are two lines coming out of the bottom. Those two lines will themselves both have a copy of the token on them, one will go over to the left into the two activities that are there, the second will go straight downward, and eventually those two paths will merge into the second horizontal line which is a synchronization point. You can think of those two paths, each having their own tokens, as running independently, and the horizontal bar at the bottom being a kind of a gate which only opens with both tokens have arrived from the top, hence synchronizing those activities. At the point at which the gate opens the two tokens are merged together, the single token goes out of the bottom into the diamond, and the diamond is essentially a joint point, which, once again, combines the two tokens and proceeds on then to the last state, and the final state at the very bottom of the screen.

Author Since: Mar 11, 2019

  1. Someone please correct me if I'm wrong, but at the top when the token reaches the diamond it doesn't split into two tokens, does it? It takes one path or the other, depending on whether the order is a single order or a subscription. It's only if the token takes the subscription path and arrives at the fork that it splits into two tokens.

Related Post