5

I'm learning Activity diagram in UML and now I'm confused with the following diagram for representing procedures when calling a pizza.enter image description here

I think a merge node should be added before the join node because if not, the join node will wait forever. Is that correct? Thank you.

lenhhoxung
  • 2,530
  • 2
  • 30
  • 61
  • 2
    See also [Conrad Bock, UML 2 Activity and Action Models, Part 3: Control Nodes](http://www.jot.fm/issues/issue_2003_11/column1/) – xmojmr Dec 30 '15 at 09:09

1 Answers1

4

I think you are right.

There should be a merge node merging the two flows coming from the decision right after Ask for toppings and a merge node to merge the two flows that have been split by the decision right after Deliver Pizza

A join node will only continue if it gets a token from all incoming flows, which will never happen if those flows are mutually exclusive because of a decision earlier on.

Geert Bellekens
  • 12,788
  • 2
  • 23
  • 50
  • thank you, now I have more confidence because there is someone having same understanding with me for that diagram – lenhhoxung Dec 30 '15 at 09:53
  • @Geert: Your answer is correct. I had to think about this in terms of tokens before I saw the two problems: those joins require tokens from ALL incoming control flows, which is impossible because some are mutually exclusive. It may be helpful to other readers to add something to that effect. – Jim L. Dec 31 '15 at 00:33
  • 1
    @JimL. I added a bit more info to my answer to make point that out. – Geert Bellekens Dec 31 '15 at 03:51