2

I want to express the below events in an activity diagram:

  • An alternative flow, such as "at step x of basic flow, user clicks cancel instead of ok".
  • An alternative entry to the use case, such as "instead of click the bold button, use can press Ctrl-B".
  • An error, such as "when user clicks save, the system is unable to save the file to disk."

How can I do these?

Thank you.

Martin
  • 215
  • 1
  • 3
  • 5

2 Answers2

5

I'm not an expert on diagramming, but I like using shapes with multiple points to specify an alternative path, such as Diamonds or Triangles

enter image description here

Rachel
  • 23,979
  • 16
  • 91
  • 159
2

you need something called constraints or guardian conditions.enter image description here

see where it says [loopguard] in that diagram? you can put [if user does x] implying the next state won't occur until the condition is true.

for the second question, I'd just write "user presses ctrl+B or selects Bold" in the same state circle or as a note to the side.

for the third question, you can use exceptions. It looks like this: enter image description here

davidhaskins
  • 2,158
  • 2
  • 18
  • 26
  • IMO you make several mistake here:1) you use concurrent node instead of decision node. 2) This is an Activity diagram, not a State Machine, so in your boxes, you should have "first Action" or "first Activity" instead of "first State". – Adrian Maire Jan 06 '16 at 08:57