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.

  • activity diagram focus on control flow of system .why you want to display error in activity diagram?
    – AjayGohil
    Nov 9, 2020 at 5:11

2 Answers 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

  • 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". Jan 6, 2016 at 8:57

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.