Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to represent 3 options in a UML Activity Diagram?

I have a situation where 3 options are presented to a user by a system:

  1. Open PDF1.
  2. Open PDF2.
  3. Proceed.

The system instructs the user to read the PDFs, but doesn't enforce it. So they're free to just click the proceed button and move on to the next screen.

I drew the following diagrams, but I feel like I've got it wrong somehow.

enter image description here

enter image description here

like image 231
voices Avatar asked Nov 30 '25 10:11

voices


1 Answers

That's not correct this way. Your 2nd attempt isn't better at all. The bars will create parallel flows, but since you join them immediately it's actually a no-op in the first case. The bar will not be reached since it waits for 3 tokens where only one can actually arrive. In the 2nd case will never continue after the join since it only gets one token from the Provides... action but need 3 to continue.

Here's a cut part of what you need to do:

enter image description here

There's a merge node at first to capture the tokens coming from either the action on top or from the two left ones. After there there are two decisions going guarded to the actions at the left. The can be continued to the top (guard [read next]) or to the bottom (guard [acknowledge]). That way the user can repeat reading (or skip it completely) until he passes the Acknowledge action. There's a final merge node preceding that action.

Note that the read/ack guards should appear twice for each flow to make it a machine readable model. The texts here are just overlaid but a human can understand it anyway.

like image 147
qwerty_so Avatar answered Dec 02 '25 04:12

qwerty_so



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!